Download this sweetcron theme for FREE
If you are a sweetcron user and looking for a theme like this, please take it as a gift from me. Just give me a link back thats all i ask. Thanks for visiting. Hoping to cya around.
If you are a sweetcron user and looking for a theme like this, please take it as a gift from me. Just give me a link back thats all i ask. Thanks for visiting. Hoping to cya around.
Over the coming weeks I’m going to be writing some posts on object orientated programming in PHP5, but to get us started there are a few techniques that we need to know, so today I’m going to be looking at variable variables. Naming conventions are really important when it comes to variable names in programming and one way we can get around this is by using the value of the variable string as the variable name. to explain this better i’ve put together the following code.
$a = 'Ashley'; $b = 'Papermashup'; $c = 'John'; $d = 'Mark'; $e = 'Luke';
$values = array('a', 'c', 'd'); foreach($values as $seat){ echo $$seat .'<br />'; }
Lets start by looking at the end of the code and more specifically the echo statement. Notice how there are two $ signs, this is because we are saying take the value of $seat and use it as the variable name and we do that by using $$. The rest of the code is pretty self explanatory, a simple array which we loop through to return the values of a, c and d. Variable variables are a good way of trimming down unnecessary code.

Via: http://feedproxy.google.com/~r/AshleyFord-Papermashupcom/~3/_PL-VpqMIuM/
Submissions, geotagged, twitxr, geo:lat=41754959, geo:lon=735093474, Tutorials, Resources, php, Quick Tip / Trick, Design, Web Design, reblog, inspiration, Freebies, Wordpress, CSS, photoshop, Screencasts, ooopx, maldives, JavaScript, jquery, Web Development, illustrator, news, Inspiring, html, Graphic Design, Reviews, effect, How-To, Photography, downloads, photo, list, layer, tutorial, Technology, Featured, tools, video, Icons, nettuts, theme, download, twitter, Developers Toolbox, Webdesign, free, funny,