Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 12-19-2013, 01:15 AM
klwm klwm is offline
Junior Member
 
Join Date: 10-09-13
Posts: 13
iTrader: 0 / 0%
input hidden

PHP Code:
<?php
foreach ($travel as $t)
  {
    echo 
"<input type=\"hidden\" name=\"travel[]\" value=\"$t\" />\n";
  }
?>
Could you please explain what is the role of symbol "\" in this code?
Does the code give the same result without that symbol?

Last edited by HTMLBasicTutor; 12-19-2013 at 04:17 AM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 12-20-2013, 03:12 PM
raicabogdan's Avatar
raicabogdan raicabogdan is offline
Contributing Member
 
Join Date: 10-03-08
Location: On the web
Posts: 116
iTrader: 0 / 0%
Because your echo quotes are double quotes, in order to use the same double quotes with the input html attributes you have to escape the quotes, else it will be interpreted that the echo contents have ended. To escape the quotes you use the backslash " \ " in front of what you want to escape.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need your Input serverextreme Web Hosting Forum 9 10-16-2006 08:42 AM
Input Please. docquesting Domain Name Forum 4 01-14-2005 12:37 PM
Need Input allbusiness Marketing Forum 4 04-28-2004 03:30 PM
Your input - if you know what design really is LazyJim Google Forum 36 10-19-2003 03:45 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 12:39 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC