If you are working on a small project and no one has the time to go in and resize all images to fit a specified area, I have a quick fix for you. This fix only works when the specified area is restricted by either height or width: img {width: 180px; height: *%; }. This […]

Hey everyone. I’m looking for a solution that will allow mp3s to play from a private directory below the public_html directory. For instance, all my mp3s are in the “/home/user/private/” directory while my web-files reside in “/home/user/public_html/”. The problem with this setup is that the client side needs a client path: “www.iaps.ca/private”, but since the

Playing music (mp3s) from ../public_htmlRead More »

Having issues with $_SESSION[‘var’]’s not being saved after you redirect the user via header()? Add exit(); after the header() call. Example: $_SESSION[’emailed’] = true; header(‘Location: response.php’); exit(); Cheers! FacebookTwitterPinterestDiggitEmailPrint

We’ve tried many different methods to set precision for a number variable (specifically a currency amount) and we’d like to share the best method we’ve found: number_format( {number}, {precision}, ‘decimal_separator’, ‘1000s_separator’ ); Example: number_format( $number, 2, ‘.’, ‘,’ ); Hope this helps! We have also tried using round( $number, {precision} ) but it ignores zeros(0)

PHP number_format()Read More »