Deleted MySQL table by mistake regenerate by PHPThe condition is you should have the values of the database stored in a string, Hey don't make that face it is not that bad. There is a chance that you have the data written somewhere. For example assume the table deleted had details of all employees like name, telephone no++, so there is a chance that this info was initially saved in a word or excel document. All you have to do is cut paste the data and save it as a string like the way I have mentioned below.
ExampleHere is an example to populate a languages table:
It is useful when you have a junk of values and no time or patience to sit and retype or copy paste:
$string="Arabic!English!Afrikaans!Farsi!Hebrew!Hindi!Malay!Malayalam!Tamil!Gujarati!Urdu!Konkani!Marathi!Telugu!Albanian!Armenian!Bulgarian!Cantonese!Chinese!Croatian!Czech!Danish!Dutch!Ethiopian!Finnish!French!German!Greek!Hungarian!Indonesian!Italian!Japanese!Korean!Mandarin!Norwegian!Polish!Portuguese!Romanian!Russian!Serbian!Sinhala!Slovakian!Slovenian!Spanish!Swahili!Swedish!Tagalog!Taiwanese!Thai!Turkish!Ukrainian!Vietnamese";
$arr=explode("!",$string); //converts the string into an array where it finds "!"
$j=0;
for ($i=0;$i<47;$i++)
{�
�� for($j=$j;$j<$i; $j++)
������ {
������� echo "INSERT INTO `languages` ( `sno` , `languages` ) VALUES ('$i', '$arr[$j]');"."
";
� }
}