Jump to content


Photo

Easy Array Question


  • Please log in to reply
3 replies to this topic

#1 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 23 August 2006 - 02:46 PM

Hey
I aint with it today, so sorry for this question. But the work dont stop cos I cant think

I have a basic array
$var = array("60.60","360.240");

The array is stored in a session
So I want to add another value say
"180.180";
I know its easy, but I am brain dead

Cheers guys

Tell me the problem, I will try tell you the solution

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 23 August 2006 - 02:50 PM

$var = array("60.60","360.240");
array_push($var,"180.180");


#3 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 23 August 2006 - 02:53 PM

Thats it

I was doing it being half a sleep, then started to do a loop, thinking What am I doing here
Tell me the problem, I will try tell you the solution

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 23 August 2006 - 03:09 PM

or:
$array[] = '180.180';





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users