<?php
echo ucfirst("name"); //Name
?>
<?php
echo strtoupper("name"); // Name
?>
<?php
echo strtolower("FIRST NAME") //first name
?>
<?php
echo trim(" Test "); // Test
//Will remove the spaces from the beginning and end
?>
<?php
$testArray = array(1 => 5, "name" => "First Name");
print_r(array_keys($testArray));
//Array ( [0] => 1 [1] => name )
?>
<?php
// Example 1
$string="";
if(empty($string))
echo "Empty string";
else
echo "Not an empty string"; //Empty string
?>
<?php
// Example 2
$strng="Test";
if(empty($strng))
echo "Empty string";
else
echo "Not an empty string"; //Not an empty string
?>
<?php
// Example 1
$string="";
if(empty($string))
echo "Empty string";
else
echo "Not an empty string"; //Empty string
?>
<?php
// Example 2
$strng="Test";
if(empty($strng))
echo "Empty string";
else
echo "Not an empty string"; //Not an empty string
?>
<?php
$str = "Test's";
echo addslashes($str); //Test's
?>
<?php
$str = "Test's";
echo stripslashes($str); //Test's
?>
<?php
$str = "<p>First Name</p>";
echo htmlentities($str); //<p>First Name</p>
?>
Zend | Magento Certified PHP | eCommerce Architect