Re: [PHP] Re: PHP, over javascript code simple \n

2004-08-21 Thread Louie Miranda
single ' will work fine. :) not double "

On Fri, 20 Aug 2004 11:49:10 +0200, aRZed <[EMAIL PROTECTED]> wrote:
> 
> >  > print("
> > if (document.rpcjs_louie.ColCustName.value == \"\") { walangfield +=
> > \"Missing: Firstname\n\"; }
> > ");
> > ?>
> 
> try simply escaping the "\" before the "n" with an additional "\" or in
> other words: use "\\n" instead of "\n". PHP will interpret "\\" as an "\".
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Louie Miranda
http://www.axishift.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP, over javascript code simple \n

2004-08-20 Thread aRZed


try simply escaping the "\" before the "n" with an additional "\" or in 
other words: use "\\n" instead of "\n". PHP will interpret "\\" as an "\".

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP, over javascript code simple \n

2004-08-19 Thread Louie Miranda
Got it.

use ' and not "

because php reads if its under "

On Fri, 20 Aug 2004 11:10:24 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote:
> Im having problems. Because my javascript is inside a PHP code.
> Now below are 1 line code of a print function that display this on the
> html header.
> i must put "\n" after the Firstname. But PHP actually reads \n so when
> i view it on a browser the js code moves down. Which is wrong, because
> it wont work anymore.. what i want is js should use the \n instead. is
> there any alternative for \n? so it can display properly on php?
> 
>  print("
> if (document.rpcjs_louie.ColCustName.value == \"\") { walangfield +=
> \"Missing: Firstname\n\"; }
> ");
> ?>
> 
> --
> Louie Miranda
> http://www.axishift.com
> 


-- 
Louie Miranda
http://www.axishift.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php