you can also do this to save room without having to create $varname:
${"id".$num} = "some text";
Jordan
On Aug 29, 2005, at 12:10 AM, Micah Stevens wrote:
Hi Chris,
You can use variable variables.. like this:
$num = 2
$varname = "id".$num;
$$varname = "id2 is stored here!";
It's in the
The format should be $id[$count]
-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]
Sent: Monday, August 29, 2005 8:46 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Brain not working, help needed :-)
Hi there everyone,
I have the following code:
while ($row
Figured I'd expand on what these evaluate to, in case anyone gets lost
otherwise:
>-Original Message-
>From: Micah Stevens [mailto:[EMAIL PROTECTED]
[snip]
>You can use variable variables.. like this:
>
>$num = 2
$num == 2 [obviously :) ]
>$varname = "id".$num;
$varname == "id2"
>$$varn
Hi Chris,
You can use variable variables.. like this:
$num = 2
$varname = "id".$num;
$$varname = "id2 is stored here!";
It's in the docs in the variables section..
HTH,
-Micah
On Sunday 28 August 2005 11:45 pm, Chris Payne wrote:
> Hi there everyone,
>
>
>
> I have the following code:
>
>
>
>
Hi there everyone,
I have the following code:
while ($row = mysql_fetch_array($sql_result)) {
$id = $row["id"];
$video_link = $row["video_link"];
$video_thumbnail = $row["video_thumbname"];
$video_title = $row["video_title"];
$video_description = $row["vide