0
4
basically, what i want to know is, for the second parameter in the create_function function, is there anyway to pass a string without a semicolon? or will it not work. example: taken from php.net create_function('$a,$b', 'return "CRCs: " . crc3...
0
1
I have a loader class for all my sites I create. I use it to load things out of a assets folder. eg I call load::js('jsname'); to load the jsname.js file from /assets/js my question is, is it possible to create arbitrary functions so I could...
2011-02-23
2
7
I am trying to create a PHP function that takes another PHP function as input. Here is an example: function getMean(function){ $allUsers = getAllUsers(); $sum = 0; foreach ($allUsers as $currentUser ){ $sum =+ (function($...
2011-03-25
0
4
I want to create my own function loop(): loop($x,$y){ //do something } it should work like for, foreach operators: $y=count($array); for($x=0; $x<$y; $x++){ //do something } How to create functions like this with { } in PHP? ...
2009-04-07
12
5
Is there a mysql stored function out there to create a slug from a url (or any value really). So my query can be: SELECT *, SLUG(url) FROM clients ...
2011-03-24
1
1
I was wondering if actionscript had something equivalent to PHP's create_function. Specifically, the ability to create a function from a string is what I am looking for. ...
9
3
is it possible to create function inside a class method and how do I call it ? i.e. class Foo { function bar($attr) { if($attr == 1) { return "call function do_something_with_attr($attr)"; } else ...
2011-01-17
0
2
Lets say I have a table tilistings with a dozen columns, and about 2,000 rows there is one column cityname that has probably 50 different values in it. What I want to do, is search through the tilistings and create another table that just contain...
2011-01-29
29
6
I have a function that is effectively a replacement for print, and I want to call it without parentheses, just like calling print. # Replace print $foo, $bar, "\n"; # with myprint $foo, $bar, "\n"; In Perl, you can create subroutines with par...
2008-10-17
0
2
I want to create a function to call a key and value on specific table. Basically my statement like this $query = 'SELECT SQL_CALC_FOUND_ROWS '.$key.' FROM users WHERE status="'.$value.'"'; Now I want...
2011-06-19