Re: passing data thru link



..oO(MS)

<?PHP
echo "<a href='user_edit.php?id=".$row_dbUsers['id']."'>edit</a>";
?>

Any reason why you use concatenation instead of embedding the variables
directly into the string?

echo "<a href='user_edit.php?id=$row_dbUsers[id]'>edit</a>";

or

echo "<a href='user_edit.php?id={$row_dbUsers['id']}'>edit</a>";

Micha
.



Relevant Pages

  • Re: passing data thru link
    ... Any reason why you use concatenation instead of embedding the variables ... directly into the string? ... No Reason other than my personal preference!! ...
    (alt.php)
  • Re: Controlling Javascript from server side
    ... but five different language implementations here. ... 'true' means that the request must be handled asynchronously. ... There is exactly *no* reason for such a thing here. ... | percent-endoded string). ...
    (comp.lang.javascript)
  • Re: syntax...
    ... B&D on the part of the language designer. ... probably handle concatenation of string literals by itself, ... bitwise XOR, or if not that, then exponentiation.) ...
    (comp.lang.misc)
  • Re: Is that a good design?
    ... I would have been able to reason the first gotcha. ... public string FirstName; ... has a reference architecture that shows the use of patterns. ... Public Shared Function GetUserInstance() As User ...
    (microsoft.public.dotnet.framework)
  • Re: packagemaker script assistance needed.
    ... Is there a reason you're conditionalizing the whole block instead of one ... string will do as you want.) ...
    (comp.sys.mac.programmer.help)