scochejeoge
New Member
Is there something wrong with using the following:\[code\]$test .= '$row[\''.$row[0].'\'].';//When echo'ed showsecho $test;//$row['CustomerID'].$row['CompanyName']//I have used it like thiseval($test)\[/code\]PHP complains:\[code\]Parse error: parse error in C:\w.php(73) : eval()'d code on line 1\[/code\]I can't see where the parse error is. Please help.Update + More Detail\[code\]function get_rows(){//This function needs to find out what columns it will query for//so it calls get_columns()while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_NUMERIC)){ $pdf->Cell(0,10, eval($column_names) ,0,1);}function get_columns(){//returns a string of the columns that need to//be retrievedreturn $column_names;}\[/code\]I have a PDF creator in function get_rows() which needs to be passed a string which is the value of the evaluated code I have shown above.I have condensed what is happening as there is too much code.