Re: [PHP] RIGHT Function?

2009-11-13 Thread Jim Lucas
sono...@fannullone.us wrote: Jim, $parts = explode(PHP_EOL, $item['unitprice']); $price = '$'.(( count($parts) > 1 ) ? $parts[0] : $parts[(count($parts)-1)]); For some reason, I couldn't get explode to work with PHP_EOL. $parts[0] would return the entire field, so apparently it wasn't

Re: [PHP] RIGHT Function?

2009-11-13 Thread sono-io
Jim, $parts = explode(PHP_EOL, $item['unitprice']); $price = '$'.(( count($parts) > 1 ) ? $parts[0] : $parts[(count($parts)-1)]); For some reason, I couldn't get explode to work with PHP_EOL. $parts[0] would return the entire field, so apparently it wasn't "exploding". So I tried exp

Re: [PHP] RIGHT Function?

2009-11-13 Thread sono-io
Hi Jim, $parts = explode(PHP_EOL, $item['unitprice']); $price = '$'.(( count($parts) > 1 ) ? $parts[0] : $parts[(count($parts)-1)]); Thanks for the code! After reading up on PHP_EOL and explode, I now understand what you've done. However, can you tell me why you like this better? Is

Re: [PHP] RIGHT Function?

2009-11-13 Thread Jim Lucas
sono...@fannullone.us wrote: > I think I've solved a problem that I had posted back in September. > Here's a recap: > > == > I need to grab a dollar amount from a text field in a MySQL db that > can contain more information than just the price. Here are 4 examples > o

Re: [PHP] RIGHT Function?

2009-11-13 Thread sono-io
I think I've solved a problem that I had posted back in September. Here's a recap: == I need to grab a dollar amount from a text field in a MySQL db that can contain more information than just the price. Here are 4 examples of what could be in that field: 48,(min)

Re: [PHP] PHP: creating combobox in excel sheet?

2009-11-13 Thread Kim Madsen
Jim Lucas wrote on 2009-11-13 17:06: Kim Madsen wrote: Hey I'm working on creating excel sheets from these classes: http://articles.sitepoint.com/article/pear-spreadsheet_excel_writer/3 http://pear.php.net/package/Spreadsheet_Excel_Writer/download/ Does anyone know how to create a combo box

RE: [PHP] is Aptana taking a crap on the face of PHP?

2009-11-13 Thread Daevid Vincent
> -Original Message- > From: tedd [mailto:tedd.sperl...@gmail.com] > Sent: Friday, November 13, 2009 6:06 AM > > You also have apps like GoLive and Dreamweaver that make excellent > IDE's -- you don't have to use the WYSIWYG junk. > > I'm learning to use Eclipse and it's great, but it do

Re: [PHP] PHP: creating combobox in excel sheet?

2009-11-13 Thread Jim Lucas
Kim Madsen wrote: > Hey > > I'm working on creating excel sheets from these classes: > > http://articles.sitepoint.com/article/pear-spreadsheet_excel_writer/3 > > http://pear.php.net/package/Spreadsheet_Excel_Writer/download/ > > Does anyone know how to create a combo box from PHP with these (o

[PHP] PHP: creating combobox in excel sheet?

2009-11-13 Thread Kim Madsen
Hey I'm working on creating excel sheets from these classes: http://articles.sitepoint.com/article/pear-spreadsheet_excel_writer/3 http://pear.php.net/package/Spreadsheet_Excel_Writer/download/ Does anyone know how to create a combo box from PHP with these (or other classes)? By combobox I me

Re: [PHP] uniqid() and repetition of numbers generated

2009-11-13 Thread tedd
At 9:11 AM +1000 11/13/09, Angus Mann wrote: Thanks Ashley. To clarify, the reason I don't want to use auto-increment : different users with their own populated databases may wish to merge some or all of their data. The unique identifier needs to be carried along with the rest of the data, henc

Re: [PHP] is Aptana taking a crap on the face of PHP?

2009-11-13 Thread tedd
At 11:26 PM -0500 11/12/09, Bastien Koert wrote: The issue here is that there are a lot of choices in the PHP space. Eclipse, Aptana, Komodo, Zend, a host of various simpler text editors. Aptana has chosen not to compete in this space and its their choice. Personally, I use NetBeans or Komodo w

Re: [PHP] uniqid() and repetition of numbers generated

2009-11-13 Thread Ashley Sheridan
On Fri, 2009-11-13 at 14:30 +1000, Angus Mann wrote: > > Here's part of the confusion: > > > > If you were to express the number of microseconds since 1970 in a > > decimal number, it would indeed take 16 digits. > > > > But uniqid() returns a /13 character string/, not a 13 digit number. The > >