View Single Post
  #1 (permalink)  
Old 07-07-03, 12:11 PM
banquet banquet is offline
New Member
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
eval variables syntax

Hi guys,

I have read many tutorials on eval for php and its just getting any
clearer. Im used to javascript and flash eval.

I have 5 text boxes answer1...answer5 that will be submited to insert
into a
database. When I retreive the form values I would like to put them
into a variable ($answer1,$answer2 ...) like this:


$i++;
//update actions for 5 answers
$sAnswer = eval("$answer".$i);


So I would like $sAnswer to equal and evaluate $answer1...$answer5

I cant seem to figure out how the heck to create the syntax.

Thanks for your help in advanced.

David
Reply With Quote