i have following array, need display names on form. how can via foreach()
loop?
what trying is:
array ( [0] => array ( [to_user_name] => john ) [1] => array ( [to_user_name] => mike ) )
foreach( $myarray $subarray ) { echo $subarray["to_user_name"]; }
it's not clear how want use values in form, echo
values wherever you'd need them, e.g.,
foreach( $myarray $subarray ) { echo "<input type=\"text\" name=\"user_name\" value=\"" . $subarray["to_user_name"] . "\">"; }
Comments
Post a Comment