echo array values in php

This is very simple and common task, But many PHP newbies(beginners) don’t know about it. To see the Structure of PHP array , you have to use PHP built in function called print_r(),This will give a listing of all the items in the array(including multi-dimensional arrays). The following example demonstrate how to create and display [...]

How to remove all the empty elements of an array with php ?

$test_array = array(’foo’, ‘bar’, ”, ‘sleep’, ”,null,’arjun’); $test_array = array_filter($test_array); print_r($test_array);

How to trim all members of an array with PHP?

array_map() function allows us to make the callback to the elements of the given arrays. By using php built in function trim() with array_map() you can trim the white space from the beginning and ending of all the elements in an array. Here the interaction we will be done internally so it provides maximum performance. [...]

Displaying database records in unordered list format Using PHP?

<?php $db = mysql_connect(’localhost’,'root’,”); mysql_select_db(’test_db’,$db); $query = mysql_query("SELECT * FROM test_table"); while($row = mysql_fetch_object($query) ) { $data[] = $row; } ?>   <ul> <?php foreach($data as $items) { ?> <li><a href="<?php echo $items->item_url; ?>" title="<?php echo $items->item_name; ?>"><?php echo $items->item_name; ?></a> </li> <?php } ?> </ul>

IE7 text-indent bug in CSS ?

When Making links with Background images to keep text visible to search engines or text-to-speech applications we use Text indent about large negative values to hide the anchor Text We Give . It works on all major browser except IE7. So , In order to fix This issue we have to add the text transform [...]

You might also likeclose