Jump to content

Rony

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Rony's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ken, It worked !! I had used simple array before I looked up array_push but I dont know what I did differently then. Before it kept on showing me just the last value in the array outside the while loop. Everyone thank you for all your help !! :D
  2. Ken, I tried the implode function before. It just gives me Array,Array,Array  How do I get the actual values (I also tried array_values) Shogun, I didnt not understand how can I passteh variables like ?v1=x&v2=x&v3=x I trying the serialize and urlencode now
  3. I am passing the values to the URL to create a pie chart. Example if the array has values $conatiner = {3,7}; The url should actually be http://...../piechart.php?d[]=[color=red]3[/color]&l[]=windows&d[]=[color=red]7[/color]&l[]=apple&t=Test This would show me the piechart. I get there values 3, 7 etc from the database. I thought storing them in an array and then passing them would do teh trick. I know I need a loop for it and I tried foreach but that didnt work. How can I build a comma seperated list?
  4. I am getting values from a sql query and storing them in an array using the array_push function. I have tried many many things to print the array $conatiner or rather pass the values of the array into the URL. It only seems to work if you use the print_r command. I even tried using that but it would add a lot of other data which is not necessary. I have been trying to figure this out for 2 weeks now !!  ??? Please help !! <?php include connection file; $result = mysql_query(" my query") or die ("LSE usage query failed"); $container = array(); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { $diff = $row{'end_ts'} - $row{'start_ts'} ; $value=  gmdate( 'H:i:s ', $diff ); array_push($container, array($value)) ; } $url="http://...//piechart.php?d[]=". [color=red]$container[/color] . "&l[]=time&t=Test"; ?> <a href="<?php echo $url; ?>">click me</a>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.