You are here: Re: Use php to "echo" javascript on a web page « PHP Programming Language « IT news, forums, messages
Re: Use php to "echo" javascript on a web page

Posted by eholz1 on 02/27/07 00:13

On Feb 26, 2:27 pm, Colin McKinnon
<colin.thisisnotmysurn...@ntlworld.deletemeunlessURaBot.com> wrote:
> 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.

C et All,

Thanks for reminding me about the double quotes, cleaner.
I will check the manual (I assume it is the on-line PHP manual)

Thanks,

eholz1

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация