## In a particular div by using this we can show only 100 letters and then … in php by removing tags. $product_description = html_entity_decode($product_description); …
Read MoreCodeIgniter
Php: decode html data in php
## HTML DECODE :: varible $product_offer_decsription; html_entity_decode($product_offer_decsription);
Read MorePhp: How to show star rating
## Showing Rating in Php using star & blank rating $ProductId = 1; $product_rating_qu = mysql_query(“select avg(rating) as star_rate from ratings where ratedto='” . $ProductId …
Read MorePhp: show number with two decimal point
## make number format upto 2 decimal point here we can use, number_format(): echo number_format((float)$number, 2, ‘.’, ”); ## Example: $foo = “105”; echo number_format((float)$foo, …
Read Morefind key in array using php
## Find if key exists in the array list. Here key is searching in POST array. array_key_exists(‘status’, $_POST); Returns TRUE if the key exists and …
Read MoreRedirect to another page using javascript
Use this to redirect to another page. <script> window.location = “http://example.com/foo.php?option=500”; </script>
Read MoreHow to check ajax request or not
if (!empty($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’ ) { // It is ajax Request }
Read More