Posted by Colin McKinnon on 02/26/07 22:27
eholz1 wrote:
> I was thinking about making a php function that uses variables for the
> href code , and then
> echoing a string like this: (with appropriate dink marks, etc)
> define these variables:
> $back = 'images/?p="$p"';
You won't interpolate $p if its inside single quotes - assuming $p is a php
variable which holds some value:
$back="images/?=\"$p\"";
but really those quotes should be urlencoded (although since you'll be
reading the value back into PHP, I can't imagine why you need/want the
quotes at all).
> $next = 'viewpix.php?p=$p&s="$i"';
>
Lose the "" around $i, use double quotes around the whole string.
You seem to have a basic grasp of programming - take the time to read
sections I, III & IV of the manual properly.
C.
[Back to original message]
|