Monthly Archives: October 2012

Generate Order Number

That’s what I’ll do. As for formatting the number, here’s what I did…

$id_num = 5;
$order_num = sprintf("NSC-%010d", $id_num);
echo $order_num;

That gives me a number like…


So if the $id_num is 2044 then the zero spaces will account for the larger id number and give me…


Figured I’d post it, in case anyone else needed something similar. Thanks again!

Thanks to wilhud


Remove index.php from CI

I am previously fail to do this. But Now I am success.
big thanks to CI forums for helping me out.

You just need to create a .htaccess in your root and use these codes

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]  

Hope this will help someone.


%d bloggers like this: