Command Not Found: You’ve been having a good day up till now When you type a common command in unix, it could be ls or last or who or grep or in my case rmate when low and behold, a response: bash: Command not Found This is very annoying and is often the case where […]
Author: me
$type = new Zend_Form_Element_Select(‘type’,array(‘onchange’ => ‘alert(“working”)’));
This should apply to perl as well: Variable name: $myvar = ‘foo’; ${$myvar} = ‘haswell’; echo $foo RESULT ‘haswell’ Call a function: $type = ‘red’; $myClass->$type(); == $myClass->red(); Taken from: More helpful stuff: ${“variableName”} = 12; {“functionName”}(); $className->{“variableName”}; $className->{“methodName”}(); StaticClass::${“variableName”}; StaticClass::{“methodName”}(); Are there any other Languages that can do this, I know Perl Can… And […]
Categories
Loop Through an Associative Array PHP
foreach (array_expression as $key => $value) { echo $key; }
$form->populate(array(“id” => $id));