Jump to content

Generate variable name


Recommended Posts

Hello,

For a website php and mysql are used. A recordset contains names and a filelocation.
Each name an each fillelocation needs to become a variable. I would achieve that by a for loop, see example.

for($i=0; $totalRows_RS-1 ; $i++){
($tab +($i+1)) = $row_RS['name'];
($link + ($i+1)) = $row_RS['location'];
}

PHP returns Parse error: parse error, unexpected '='..

Has anyone an idea to solve this problem?
Link to comment
https://forums.phpfreaks.com/topic/13929-generate-variable-name/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.