Echoing out variables in a function
I am trying to returning a string like this.
$col="<td><input ".$name." type='".$field['1']."' ".$id." ".$class." value='".eval( '?> '.$row[$field["2"]] .'<?php ')."'".$size." ".$maxlength." ".$disabled." ".$readonly." /></td>";
I need
value='".eval( '?>'.$row[$field["2"]] .'<?php ')."'
to be evaluated after the string is returned into the开发者_如何学编程 page so i can use my sql call
$row = $core->getRowById("email_users", $user->userid,"userid");
I include the row here.
<input type="text" readonly="readonly" disabled="disabled" size="55" value="<?= $row['username'];?>" class="inputbox" name="username">
It would then evaluate this
$row['username'];
How can I go about doing this? Do I use eval?
If I get your point: You can't do that, PHP doesn't work in a multipass way. Your eval would be a plain string in output. You have to use either POST or GET back to this page, check whether $_POST or $_GET exists, and act accordingly.
精彩评论