Tag Archives: php

PHP / MySql – Export Data to Excel

A PHP Script to export MySql data to Excel.



$select= "select user_id,email,fname,lname,bdate,fees from user order by fname";
$result = mysql_query($select);
$num_row = mysql_num_rows($result);
Continue reading


PHP : Resize embedded video

$video = stripslashes($embedded_video_code);

$video = preg_replace('~(]*width\s?=\s?["\'])[^"\']+(["\'])~i', '${1}300${2}', $video);

$video = preg_replace('~(]*height\s?=\s?["\'])[^"\']+(["\'])~i', '${1}200${2}', $video);

Joomla : How to remove Phoca Gallery footer?

In Joomla, Phoca Gallery does not give the option in the administration, whether you want to keep Phoca Gallery copyright information in footer or not.
For this you have to edit the code as follows.

Open following PHP file.


Remove the last line


Very simple.. isn’t it..?

PHP : Create array from MySql recordset

This PHP code is to create array from MySql record set.

$sel=”SELECT * FROM table_name”;
while ($row = mysql_fetch_assoc($rs))
$array[$i] = $row;