[help] php

Status
Not open for further replies.

Jo$h

Posting Freak
Jul 7, 2010
1,030
79
I have a PHP question. (as I always do)

Will the echo statement be interfered with in the following example?
PHP:
echo "<form action="" method="post">";

Thanks in advance, Josh
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
You can do either of these:

PHP:
echo "<form action=\"\" method=\"post\">";

PHP:
echo '<form action="" method="post">';

PHP:
echo "<form action='' method='post'>";
 

Jo$h

Posting Freak
Jul 7, 2010
1,030
79
Alright so I have another issue, What about putting more then one HTML tags inside the same echo statement?
 

Mac

New Member
Feb 9, 2011
111
2
I prefer you doing " ' ' " because it's standard , you can do it ' " " ' too , but on some versions it doesn't work!
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I think W3C prefer it if you use:

PHP:
<input type="text" />
..etc and PHP prefers you to use
PHP:
echo "";

So I would do:

PHP:
echo "<input type=\"text\">";

But I'm lazy, so I really do:
PHP:
echo '<input type="text">';
 

Mac

New Member
Feb 9, 2011
111
2
actually , W3C doesn't give much right details (i think so , some details are against what php.net says) , W3C is more professionalized at HTML and CSS . So i prefer
PHP:
echo "<form action='lol.php'>";
(what php.net says)
 

Jo$h

Posting Freak
Jul 7, 2010
1,030
79
Thanks ;) Problem Solved in that sense, however, Now I'm having math problems.(no pun intended)
PHP:
$x=20
$y=50
echo "$x*$y";
Appears as:
20*50 on the page.
 
Status
Not open for further replies.

Users who are viewing this thread

Top