Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 2nd, 2009, 06:00 AM
Authorized User
 
Join Date: Dec 2007
Posts: 65
Thanks: 9
Thanked 2 Times in 2 Posts
Send a message via AIM to sandeepgreaternoida Send a message via MSN to sandeepgreaternoida Send a message via Yahoo to sandeepgreaternoida
Arrow how to use /n in function and array

HI , i don't know how to use /n in function or array ... i use "<br>"; instead

pls. explain me meaning and use of /n in function or array
 
Old April 3rd, 2009, 06:06 AM
Friend of Wrox
 
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

it is "\n" not "/n".

Without "\n"
PHP Code:
echo "Name : <input type=text name=txt value=''>";
echo 
"<input type=button name=btn value='submit'>"
The above code will look in browser like following
Name : [ ][submit]
if you look at html souce of browser it will look like

Name : <input type=text name=txt value=''><input type=button name=btn value='submit'>

With "\n"
PHP Code:
echo "\nName : <input type=text name=txt value=''>";
echo 
"\n<input type=button name=btn value='submit'>"
The above code will look in browser like following
Name : [ ][submit]
if you look at html souce of browser it will look like following, it will show button line on next line, this increases code readability. but output in browser will remain same. button will be shown on same line as text box

Name : <input type=text name=txt value=''>
<input type=button name=btn value='submit'>


With "\n" and "<br>"
PHP Code:
echo "\nName : <input type=text name=txt value=''>";
echo 
"<br>";
echo 
"\n<input type=button name=btn value='submit'>"
The above code will look in browser like following
Name : [ ]
[submit]
if you look at html souce of browser it will look like following, it will show button line on next line, this increases code readability. output in browser will change this time. Button will be shown on next line due to <br> .

Name : <input type=text name=txt value=''>
<input type=button name=btn value='submit'>
__________________
urt

Help yourself by helping someone.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Function returning an array rfstuck Pro VB 6 5 March 12th, 2008 07:35 AM
IRR function or array oneroler84 Access 3 September 7th, 2007 10:37 AM
Passing an array to a Sub or Function donrafeal Access VBA 2 May 11th, 2006 09:39 AM
Question on the ARRAY function savoym VBScript 6 May 31st, 2005 06:53 AM
How to return array value from a function nebpro BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 September 29th, 2004 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.