-Original Message-
From: Neil Smith [MVP, Digital media]
[mailto:[EMAIL PROTECTED]
The variable type you need is called an array, it has numerical indexes
:
In PHP you can just omit the index and it'll be automatically
auto-incremented from zero, so there's no need to maintain a
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
$$varname = id2
Norland, Martin wrote:
while ($row = mysql_fetch_array($sql_result) {
$videos[] = array(
'id' = $row['id'],
'video_link' = $row['video_link'],
'video_thumbnail' = $row['video_thumbname'],
'video_title' =
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 =
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 docs
Date: Mon, 29 Aug 2005 07:46:52 -0500
Message-ID:
[EMAIL PROTECTED]
From: Norland, Martin [EMAIL PROTECTED]
To: php-db@lists.php.net
Reply-To: php-db@lists.php.net
Subject: RE: [PHP-DB] Re: HTML layout and arrays (WAS : Brain not working,
helpneeded :-)..
-Original Message-
you don't have a connection to the db...either because the name.password, db
name are wrong or you lack the needed permissions to allow the query...
note that this query is a really back idea...opens the whole db up...better
to provide one connection and allow the users basic read write access