4

I need to URLENCODE this:

<?php echo 'chart.php?api_url=http://0.chart.apis.google.com/chart?'.$chart1title.$chart1type.$chart1size.$chart1barsize.$chart1gridlines.$chart1data.$chart1color.$chart1bgcolor.$chart1visibleaxis.$chart1axislabels.$chart1axisdatascale.$chart1axisranges.'alt="answeredcalls"';?>

And then decode it on the other side. How can I do this???

1
  • Do not urlencode and urldecode functions fit? Commented Aug 22, 2010 at 6:59

2 Answers 2

6
'chart.php?api_url=' . urlencode('http://0.chart.apis.google.com/chart?'.$chart1title.$chart1type.$chart1size.$chart1barsize.$chart1gridlines.$chart1data.$chart1color.$chart1bgcolor.$chart1visibleaxis.$chart1axislabels.$chart1axisdatascale.$chart1axisranges.'alt="answeredcalls"');
Sign up to request clarification or add additional context in comments.

Comments

0

Generally you won't have to use urldecode() when accessing $_GET parameters in PHP. It will be, essentially, decoded for you.

The previous answer is a good solution to the encoding part of the question.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.