few days back i was working on opencart ecommerce software. and found something nice.
bcasically this software build on PHP MVC framework, so what they have done is took all the values in one array called “data”, which user need to see on browser
and then while sending it to its template file they converted the whole data array to variables
like
$data['first_name'] = "jigish";
so in template file you ll get it as
$first_name and its value is “jigish”
so now how you do it
its nothing big magic just a simple two line of code
foreach($data as $k => $v)
$$k = $v;
isnt it very simple?
hii guys today i came across a problem wherein i had to fill in a dropdown menu with all the file names in a particular folder. and this is wat i hav got from a free source and believe me guys this is as simple as you can imagine.. Read more…
Categories: code Tags: A, action, action gt, amp, array, Art, bmp, Build, buildFileList, case, check, code, code lt, content, day, dropdown menu, Echo, Ed, exec, Execute, exis, extension, file, file names, filedropdown, fileInfo, filename, Files, folder, folder name, foreach, form, Free, free source, function, gif, hav, hii, IDE, image, images, initialize, Item, jpg, kadam, key, Li, list, lt, menu, method, name, natcasesort, NOT, Old, Open, option, option value, order, part, path, pathinfo, PHP, php session, png, POST, problem, proper path, ray, sagar, sagar kadam, scandir, Select, select name, selfile, Session, simple, Sort, source, start, theFolder, Today, Traverse, type, value, wat