Welcome Guest, Not a member yet? Register   Sign In
misc_helper
#10

(This post was last modified: 02-25-2016, 05:39 AM by Diederik.)

I would suggest using something like the example below. The function returns the wanted data (a string containing the suggesting price) if it exists, otherwise it will return false. I rename the function from display_ to get_ to reflect the action of the function, it gets the data so you can use it (not display it immediately as the display_ naming would suggest).



PHP Code:
function get_suggested_price$oprice$user_no ) {

 
   if( !empty( $oprice ) ) {

 
       $prices self::get_available_prices$oprice$user_no );

 
       if$prices'charge_out' ] > ) {

 
           return CURRENCY.number_format$prices'charge_out' ], );        

        
}

 
   }

 
   return FALSE;


Reply


Messages In This Thread
misc_helper - by malbe - 02-24-2016, 06:42 AM
RE: misc_helper - by malbe - 02-25-2016, 02:26 AM
RE: misc_helper - by Narf - 02-25-2016, 02:43 AM
RE: misc_helper - by solidcodes - 02-25-2016, 03:09 AM
RE: misc_helper - by solidcodes - 02-25-2016, 03:22 AM
RE: misc_helper - by malbe - 02-25-2016, 03:58 AM
RE: misc_helper - by Diederik - 02-25-2016, 04:33 AM
RE: misc_helper - by malbe - 02-25-2016, 04:48 AM
RE: misc_helper - by solidcodes - 02-25-2016, 05:11 AM
RE: misc_helper - by Diederik - 02-25-2016, 05:38 AM
RE: misc_helper - by solidcodes - 02-25-2016, 06:09 AM
RE: misc_helper - by malbe - 02-26-2016, 08:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB