Jump to content

[SOLVED] why wont this variable declaration work?


scarhand

Recommended Posts

It should be working. You're just echoing the wrong variable.

 

try:

<?php
  while ($row = mysql_fetch_array($sql))
  {
    $orig_{$row["name"]} = $row["value"];
  }
  
  echo 'orig_name = ' . $orig_{$row['name'];
?>

 

Ken

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.