PHP: Hypertext Preprocessor

Post Reply
User avatar
OverraS
Newbie
Posts:28
Joined:13 Aug 2009, 22:24
PHP: Hypertext Preprocessor

Post by OverraS » 30 Jun 2011, 04:54

In acest tutorial va voi explica cum creeati o conditie si cum sa testati adevarul acestia .



Exemplu:


Code: Select all


<?php

$a=10;

$b=5;

if($a < $<img src='http://www.gland.ro/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> { // Daca a mai mic ca b atunci

echo " A este mai mic ca B "; // declara ca A este mai mic ca B

}else{ // in caz contrar

echo "B este mai mic ca A"; // declara ca B este mai mic ca A

} // Sfarsit de conditie.

?>



Exemplu2:


Code: Select all


<?php

$nume="GamingLand";

if($nume == "GamingLand") { // daca nume este egal cu GamingLand

echo "Bun venit pe www.gland.ro!"; // declara intampinarea

}else{ // In caz contrar

echo "Bun venit!"; // Un simplu bun venit

} // Sfarsit conditie

?>


Code: Select all


<?php

$nume = "John";

if($nume == "Rick"){

	echo "Hello Rick";

} elseif($nume == "dmZ"){

	echo "Buna dimineata domnule!";

}else {

	echo "Neata!";

}

?>



Simplu ca buna ziua! Succes!

User avatar
csganja
Newbie
Posts:33
Joined:28 Jul 2010, 14:00
Contact:

Re: PHP: Hypertext Preprocessor

Post by csganja » 01 Oct 2011, 23:36

Numele variabilelor sunt case-sensitive

Code: Select all

if($a < $<img src='http://forum.gland.ro/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' />

Post Reply

Return to “PHP”

Who is online

Users browsing this forum: No registered users and 1 guest