Skip to main content

Posts

Showing posts from August 29, 2010

Debugging PHP with Netbeans

Most of the PHP developers are complaining that they have not a good ID for PHP debugging and every time that they have to use var_dump() print statement or PHP die or exit commands to check the state of php script. But now we can use netbeans to overcome this issue with netbeans-xdebug. I tried this with Linux and feel that working it cool. Anyway still I had not a time to try out this with windows and hope that netbeans-xdebuger working fine with windows also. Now I am going to explain how we can enable netbeans-xdebuger in Ubuntu 1. First we should have a netbeans installation package (Download from here ) 2. After installing Netbeans we can install xdebuger. To do that open terminal and type fallowing commands. sudo apt-get install php5-dev php-pear sudo pecl install xdebug 3. Now you have installed xdebug successfully but not configure with PHP yet. To Configure xdebuger with php and netbeans ID. open php.ini file using this command; sudo gedit /etc/php5/apache2/php.ini A

JQuery category selection table.

JQuery make js effect very easy and providing fancy techniques to do some stuff. In here we are going to explain how we can create category selection table using JQuery. Lets try to understand this using real world example. In this case we are having a table as fallow and we need to populate categories to select one or multiple for users. DB table, In here am using joomla coding but we can apply pure php cording to populate above table data in the side of front end. Populate table data, $db =& JFactory::getDBO(); $sqlgetcatinfor="SELECT * FROM #__ci_categoriesselection GROUP BY state"; $db->setQuery($sqlgetcatinfor); $categories = $db->loadObjectList(); //var_dump($categories); $stateul=''; $tdregionul=''; $tdcategoryul=''; $i=1; foreach($categories AS $category){ $stateul=$stateul.''; $sqlgetregions="SELECT * FROM #__ci_categoriesselecti