Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP: If Statement
#11
Hi mate,

Thanks for sharing this. Maybe you can also do some basic MYSQL things. Like:
PHP Code:
<?php $example 1;
if (
$example == 1){
mysql_query(DELETE FROM `example`); 
}
?>
Reply
#12
There's no point in adding in MySQL string as this is an If Statement tutorial, not "How to put MySQL into If Statement Tutorial". I may do another thread early next year on some things you can do with the if statement, but not for now.
Reply
#13
This is a nice post you have here, will help a lot of people.
Reply
#14
Very nice Breshie.

I was learning HTML and XML. Might go back and just learn it again. Smile
Reply
#15
HTML and XML don't really have anything to do with this tutorial, until you start going into If Statements and Forms.
Reply
#16
(12-16-2011, 05:12 AM)BreShiE Wrote: There's no point in adding in MySQL string as this is an If Statement tutorial, not "How to put MySQL into If Statement Tutorial". I may do another thread early next year on some things you can do with the if statement, but not for now.
Well, its really useful to know mysql if you gonna code in PHP.
Reply
#17
Just got to love ternary operators

PHP Code:
$name "Jimmy";
echo (
$name == "Jimmy") ? "Yes, your name is Jimmy!" "Your name is not Jimmy!"
Reply
#18
Upon your tutorial, you could also have covered direct comparisons with three equal signs (compares data type as well as data value), along with comparing unequal values. You also could have mentioned the IF/ELSEIF/ELSE statement for multiple conditions; or talk about its counterpart, the switch statement.
Reply
#19
(06-21-2012, 02:43 PM)Haxalot Wrote: Upon your tutorial, you could also have covered direct comparisons with three equal signs (compares data type as well as data value), along with comparing unequal values. You also could have mentioned the IF/ELSEIF/ELSE statement for multiple conditions; or talk about its counterpart, the switch statement.

I might create my own tutorial covering all those that you've mentioned since OP is no longer here.
Reply
#20
Than you for sharing this post, it is very useful.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 943 07-27-2020, 11:26 PM
Last Post: tk-hassan
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,671 10-10-2011, 01:00 PM
Last Post: Greyersting
  Need an If/Else Statement Grizzly 5 1,379 12-10-2009, 06:43 AM
Last Post: Grizzly

Forum Jump:


Users browsing this thread: 4 Guest(s)