[PHP] xml/cap problems

2010-08-21 Thread Tom Shaw
I am trying to decode and encode nws compatible cap xml. An example is at the bottom of this post. simplexml_load_file works fine if cap: is removed before processing. However, if it is not simplexml_load_file does not parse the file at all and libxml_get_errors returns no errors. Any and

RE: [PHP] Building an array, kind of?

2008-10-25 Thread Tom Shaw
Here's another easy way. $data = array(); while ($row = ifx_fetch_row ($charge_result2, NEXT){ $data[] = $row['id']; } ifx_free_result ($res_id); $comma_sep = implode(', ', array_values($data)); Thomas Shaw [EMAIL PROTECTED] -Original Message- From: Dan Shirah

RE: [PHP] PHP Dev Facts

2008-10-17 Thread Tom Shaw
Framework R0ckz. Definitely preferred to say the least :) Cake is cool programming wise. Usability wise I run for my life. *Do you Unit Test?* Not really. *Most Used Internal PHP Class* Pdo_mysql/pgsql. *Preferred OS CMS* Joomla. Tom Shaw [EMAIL PROTECTED] When one door closes, another opens

[PHP] Pure PHP Templating Class/AJAX Problem

2008-10-13 Thread Tom Shaw
is made. In other words the page is displaying twice. Thanks Tom Shaw [EMAIL PROTECTED] Common sense is the knack of seeing things as they are, and doing things as they ought to be done. Harriet http://www.coolquotes.com/categories/harriet_elizabeth_beecher_stowe.html Elizabeth

RE: [PHP] How to know what current system is?

2008-10-13 Thread Tom Shaw
You can try, $_SERVER['SERVER_SOFTWARE'] -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jiang Miao Sent: Monday, October 13, 2008 3:44 PM To: php-general@lists.php.net Subject: [PHP] How to know what current system is? Is there any function do that? when php in

RE: [PHP] 2 Questions.

2008-09-14 Thread Tom Shaw
data and then you would have to manually build the information into array. I'm not sure but I'm going to hack around with it a little and see what happens. Thanks Thomas -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Sunday, September 14, 2008 4:50 AM To: Tom Shaw Cc

[PHP] 2 Questions.

2008-09-13 Thread Tom Shaw
Can anybody give me any good reasons not to use a time stamp as an order number in my shopping cart. It seems to me that the number is guaranteed to be random and it saves having to make an extra time column to keep track of the order. The only small concern I have is the chance that somebody

RE: [PHP] 2 Questions.

2008-09-13 Thread Tom Shaw
increment id would not work to differentiate between orders. Another user mentioned microtime. -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2008 6:06 PM To: Tom Shaw Cc: 'PHP General' Subject: Re: [PHP] 2 Questions. Tom Shaw schreef: Can

RE: [PHP] 2 Questions.

2008-09-13 Thread Tom Shaw
-Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2008 9:52 PM To: 'Jochem Maas' Subject: RE: [PHP] 2 Questions. iamjochem wrote: My second question is I've designed a very simple Postgres database wrapper. The methods are exactly what you

RE: [PHP] php image and javascript include

2008-09-13 Thread Tom Shaw
I'm a big fan of Zend Studio 5. It's pretty hard to beat considering how fast you can code load up the page refresh, and the editor itself is very clean plus it works in linux. I know a lot of people like to soft tab but I just don’t have the patience. Hard tabs all the way for me. Tom Shaw

[PHP] CSV output.

2008-09-08 Thread Tom Shaw
only 234 shows up. Is there any way to force the zeros into the spreadsheet? Thanks Tom Shaw [EMAIL PROTECTED]

RE: [PHP] CSV output.

2008-09-08 Thread Tom Shaw
] Sent: Monday, September 08, 2008 3:59 PM To: Tom Shaw; php-general@lists.php.net Subject: RE: [PHP] CSV output. -Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 3:54 PM To: php-general@lists.php.net Subject: [PHP] CSV output. I'm

RE: [PHP] CSV output.

2008-09-08 Thread Tom Shaw
wrong. -Original Message- From: Eric Gorr [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 4:21 PM To: PHP General Subject: Re: [PHP] CSV output. On Sep 8, 2008, at 5:06 PM, Tom Shaw wrote: Actually that won't work I tried it. For some reason the .00 shows up when I try

[PHP] Summing array indexes.

2008-09-04 Thread Tom Shaw
[order_product_price_1] = string(5) 25.00 [order_product_price_2] = string(5) 15.00 [order_total_price] = string(0) 40.00 } Tom Shaw [EMAIL PROTECTED]

RE: [PHP] Summing array indexes.

2008-09-04 Thread Tom Shaw
['order_product_amount_1'])) { $data['order_product_total'] = number_format($data['order_product_total'] + $data['order_product_amount_1'], 2, '.', ''); } -Original Message- From: Eric Gorr [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2008 5:17 PM To: PHP General; Tom Shaw Subject: Re

[PHP] Creating single row for multiple items.

2008-08-31 Thread Tom Shaw
My array looks very similar to this. I need to create a single row for the items that have the same order number for CSV export. I'd prefer to do this PHP wise instead of SQL. But would appreciate any help I can get. $ar = array( array( order_id = 34, order_number =

[PHP] Sorting Arrays

2008-08-22 Thread Tom Shaw
I'm having a problem sorting my array and wondered if anybody had experience sorting arrays by their values. What I need to do is resort the array below where the most expensive product shipping price starts at position zero no matter how big the array is. array(2) { [0] = array(48) {