Php tutorials for beginners with example

stripos – PHP String Functions

Syntax : stripos ( string, search_string, start ); Description : It’s an inbuilt function of PHP. stripos() function find the position of the first occurrence of a search_string in a string....

Php tutorials for beginners with example 0

stripcslashes – PHP String Functions

Syntax : string stripcslashes ( string); Description : It’s an inbuilt function of PHP. stripcslashes() function un-quote string quoted with addcslashes(). Recognizes C-like \n, \r …, octal and hexadecimal representation. Note : We can use this...

Php tutorials for beginners with example 0

stripslashes – PHP String Functions

Syntax : string stripslashes ( string); Description : It’s an inbuilt function of PHP. stripslashes() function un-quote string quoted with addslashes(). Note : We can use this function to clean up data...

Magento Step by Step tutorials 0

How To Get Table Name in Magento..?

Get Table Name in Magento : You can easily add table in Magento by using the following code. Suppose you need to get table name category_product. Table Name in Magento :...

Php tutorials for beginners with example

substr – PHP String Functions

Syntax : substr ( string, start_position, length ); Description : It’s an inbuilt function of PHP. substr() function will return part of a string. Parameter : string – This is a Required parameter....

Php tutorials for beginners with example

strtr – PHP String Functions

String strtr ( string, from, to ); OR String strtr ( string, replace_array ); Description : It’s an inbuilt function of PHP. strtr() function translate characters or replace strings. In case if...

Php tutorials for beginners with example

substr_count – PHP String Functions

Syntax : substr_count ( string, substring, start_position, length ); Description : It’s an inbuilt function of PHP. substr_count() function counts the number of times a substring comes in a string. Note: The...

Php tutorials for beginners with example

substr_compare – PHP String Functions

Syntax : substr_compare ( string1, string2, start_position, length, case_insensitivity ); Description : It’s an inbuilt function of PHP. substr_compare() function will compares two strings from a specified start position. It do the binary...

Php tutorials for beginners with example

substr_replace – PHP String Functions

Syntax : substr_replace ( string, replacement, start, length ); Description : substr_replace() function will replace text within a part of a string. As the name suggest, it works similarly as its...

Php tutorials for beginners with example

uniqid – PHP Function

Syntax : uniqid (prefix, more_entropy) ; Description : The uniqid() function generates a unique ID based on the microtime (current time in microseconds). This is an inbuilt function of PHP. ID...

Magento Step by Step tutorials

How To Get last order ID in Magento?

Magento Get Last Order Id : You can get last order Id in magento by using the following code in Model. $orders = Mage::getModel(‘sales/order’)->getCollection() ->setOrder(‘increment_id’,’DESC’) ->setPageSize(1) ->getFirstItem(); echo $orders->getEntityId() This...

Php tutorials for beginners with example 0

wordwrap – PHP String Functions

Syntax : wordwrap ( string, width, break, cut ); Description : wordwrap() function will Wraps a string to a given number of width using a string break character. Parameter : [table caption=”” width=”100%”...

Magento Step by Step tutorials 0

How to get coupon code applied on cart in Magento.?

Magento get coupon code applied on cart code You can use the following getCouponCode method to apply coupon code on cart in Magento $coupon_code = Mage::getSingleton(‘checkout/session’) ->getQuote()->getCouponCode(); You can follow...

Php tutorials for beginners with example 0

nl2br – PHP String Functions

Syntax : string nl2br( string , use_xhtml); Description : It is an inbuilt function of PHP. nl2br() function inserts HTML ( <br> or </ br> ) line breaks before all...