Both are proper syntax I think but I like using brackets. Only problem with me is I am always forgetting to add the $ signs.

Both are proper syntax I think but I like using brackets. Only problem with me is I am always forgetting to add the $ signs.
I always use brackets tho i get criticized a lot for doing it. Like I use brackets where some people don't eg: "return(true);" or "print("eg");" or "include("eg.php");" etc
I usually do that if I left PHP for along time and I've been programming in vb.net looolBoth are proper syntax I think but I like using brackets. Only problem with me is I am always forgetting to add the $ signs.
Last edited by Protege; 06-05-2008 at 05:03 PM.
Hi, names James. I am a web developer.
Lol why this thread. but i might as well join in
(Why am i doing this ///&%#FR$%$# > Click>Echo(')D(&#$NFI)
I can code PHP :d (Clappage)
Back for a while![]()
Well it's pretty simple to forget. Well done!:eusa_clap
Fail, -1.
Seeing as people are putting echos I'll do this
PHP Code:<?php
echo('<meta http-equiv="refresh" content="0;url=http://php.net">')
?>
Hi, names James. I am a web developer.
So if u use (' ') ;
Then you can do "" inside??!?!
I never knew that
PHP Code:<?PHP
$knownSinner = mysql_query("SELECT * FROM `idiotlist` WHERE `username` = 'knownSinner'");
$Howmany = mysql_num_rows($knownSinner);
if ($Howmany == '0'){
print "You are only lying to yourself...";
}else{
print "Thats what i thought.";
}
?>
Last edited by Jackboy; 06-05-2008 at 05:30 PM.
Correct and you can do it the opposite way round. eg:...or you can escape the quoations by adding a blackslash.PHP Code:<?php echo("<font face='Tahoma'>") ?>
eg
Its good if your doing this tooPHP Code:<?php echo("<font face=\"Tahoma\">") ?>
your bit of mysql could be better though.PHP Code:<?php echo('It\'s great') ?>
orPHP Code:<?PHP
$knownSinner = mysql_query("SELECT * FROM `idiotlist` WHERE `username` = 'knownSinner'");
if(mysql_num_rows($knownSinner) == 0) {
print "You are only lying to yourself...";
} elseif(mysql_num_rows($knownSinner) > 0) {
print "Thats what i thought.";
}
?>
PHP Code:<?PHP
$knownSinner = mysql_query("SELECT * FROM `idiotlist` WHERE `username` = 'knownSinner'");
$n = mysql_num_rows($knownSinner);
if($n == 0) {
print "You are only lying to yourself...";
} elseif($n > 0) {
print "Thats what i thought.";
}
?>
Last edited by Protege; 06-05-2008 at 05:58 PM.
Hi, names James. I am a web developer.
Want to hide these adverts? Register an account for free!