Page 1 of 1

variable in random array?

Posted: Mon Jul 03, 2006 6:16 am
by jasondavis

Code: Select all

$random_array = array('w4w $friend_count  friends here', 'click me', 'I can get you tons of friends...I have over $friend_countk');
How can I get the variables friend_count to work in the array like that, I dont have proper synthax

Posted: Mon Jul 03, 2006 6:34 am
by Oren
Replace the ' (single quote) with " (double quote) :wink:

Posted: Mon Jul 03, 2006 6:51 am
by JayBird
...or like this

Code: Select all

$random_array = array('w4w '.$friend_count.'  friends here', 'click me', 'I can get you tons of friends...I have over '.$friend_countk.'');

Posted: Mon Jul 03, 2006 9:37 am
by Oren
Yes, both are fine 8)