cyprus Posted September 17, 2006 Share Posted September 17, 2006 I am tring to make my dates look easier to read in a list. I have tried the following, as well as numerous permutaions!! Thankscase 'UnitPrice':$val = '£' . number_format($val,2); break;case 'Qty': $val = number_format($val, 0) . ' off'; break;case 'RunningTotal': $val = '£' . number_format($val,2);break;[b]case 'Orderdate': $val = .date_format(date("j-M-Y", strtotime(['Orderdate']))); break;[/b] Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 17, 2006 Share Posted September 17, 2006 And ... Quote Link to comment Share on other sites More sharing options...
Barand Posted September 17, 2006 Share Posted September 17, 2006 date_format() ??? Still got your VB hat on.Try[code]case 'Orderdate': $val = date("j-M-Y", strtotime($val)); break;[/code] Quote Link to comment Share on other sites More sharing options...
cyprus Posted September 17, 2006 Author Share Posted September 17, 2006 Thanks again Barand. VB Hat?, so it still shows does it? I wish it was in VB. What you did worked as ever, thanks again. While there, do you know of any packages that enable HTML to be written around PHP. Sorry to admit I normally cheat and use Frontpage to do all the HTML side, ie making pages look smart, and then go into writing the PHP bits so that I can place things in tables. If I work backwards, then I get in a mess and my page gets created in a tabular form, wasted page areas. Thought I would just ask, thanks again. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 17, 2006 Share Posted September 17, 2006 I tend to to echo the HTML code from within PHP and avoid wysiwyg editors - I like to be in control. (I use [url=http://www.nusphere.com]Nusphere PHPEd[/url] - editor, instant manual lookup, code insight, debugger, profiler, edit via ftp, remote debugging, db client interface etc etc.For tables of data I use my baaGrid class (see my sig, bit like .net datagrid)include 'baagrid.php';$grid = new baaGrid("SELECT bla FROM tablename"); // optional formatting options go here$grid->display();Done - instant table, but lots of formatting options too. (End of plug).I was wondering why you opted for the SELECT to display the returned data rather a conventions table, which would give a far more flexible method of displaying the results? Quote Link to comment Share on other sites More sharing options...
cyprus Posted September 17, 2006 Author Share Posted September 17, 2006 Thanks. That Baagrid is something else!! I miss all my VB goodies like Flexgrid etc. Feel almost homesick now. Certanly very useful, probably a bit expensive for light useage. Had I gone the other way, ie insert checkboxes first instead of programatically growing them, I'd know where they were going to appear. Aynhow all good fun if you can survive it. Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.