Jump to content

manohoo

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by manohoo

  1. $user->attributes() is a method (function) $user->attributes is a property (variable) if $user->attributes is an array then you can display it's contents like this: print_r($user->attributes);
  2. there's no need to echo when calling the function, try this: month($birthdate_month, $birthdate_day, $birthdate_year);
  3. Do you know how to use loops? Your answer might be there.
  4. deleted my post, i realized it wasn't what you were looking for
  5. The answer is yes, a few minutes ago I posted this for someone who wanted to simulate the lottery: $numbers = array(); function draw() { return rand(1,59); } for ($i=0; sizeof($numbers) < 6; $i++) { $new = draw(); if (in_array($new, $numbers)) { $new = draw (); } else { $numbers[] = $new; } } var_dump($numbers);
  6. Do a var_dump($categoryquery) right before executing the query and you will find out why.
  7. get_field() is a function, image1 is a parameter. If you have all the parameters in an array then you can loop like this: $images = array('image1', 'image2', 'image3'); foreach ($images as $row) { get_field($row); }
  8. You are confusing me, you are creating table 'tb_event' but... you are querying table 'tb_acara'..... Assuming that your query is against table 'tb_event' this what I would do to retrieve September events: $sql = "SELECT * FROM tb_event WHERE MONTH(t_date)=9";
  9. Your question is not clear: code in a form? what do you mean by this? which code? which form? show the code. $r_in... where is this variable defined? again, show the code!
  10. PFMaBiSmAd, simple, brilliant!
  11. A foreach statement produces 3 strings per iteration: foreach($_POST as $key=>$value) { $str1 = "$"."val_"."$key = new validation ('$key', '$value', '$val[$key]', null);"; $str2 = "$"."val_"."$key"."->validate()"; $str3 = "$"."rs .= "."$"."val_"."$key"."->error;"; echo "$str1 <br />"; echo "$str2 <br />"; echo "$str3 <br />"; } Each iteration produces output as follows: $val_master_ARSAcctNo = new validation ('master_ARSAcctNo', 'PM25-00001', 'arsacctno_pmi', null); $val_master_ARSAcctNo->validate() $rs .= $val_master_ARSAcctNo->error; I want to execute each one of the strings using eval(), so far I've been unsuccessful, any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.