RE: Invalid Arguements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Terion Miller [mailto:webdev.terion@xxxxxxxxx] 
Sent: Wednesday, November 19, 2008 9:39 AM
To: Boyd, Todd M.
Cc: PHP General Mailing List
Subject: Re:  Invalid Arguements

I've been trying to catch on to php on the fly, I started with Cold fusion years ago then did asp for a long time, for some reason php gives me problems, it doesn't at all seem intuitive to me or even logical for that matter....guess I'm just used to the easy stuff.

when I use the var_dump as suggested I get: 
Parse error: syntax error, unexpected '<' in C:\Inetpub\wwwroot\WorkOrderSystem\WorkOrder.php on line 136

On Wed, Nov 19, 2008 at 8:51 AM, Boyd, Todd M. <tmboyd1@xxxxxxxx> wrote:
Taking this back on-list...


From: Terion Miller [mailto:webdev.terion@xxxxxxxxx]
Sent: Wednesday, November 19, 2008 8:44 AM
To: Boyd, Todd M.
Subject: Re:  Invalid Arguements

I don't know how to run is_array this is the problem I'm a designer that
is stuck doing a coders job


On Wed, Nov 19, 2008 at 8:36 AM, Boyd, Todd M. <tmboyd1@xxxxxxxx> wrote:
> -----Original Message-----
> From: Terion Miller [mailto:webdev.terion@xxxxxxxxx]
> Sent: Wednesday, November 19, 2008 8:32 AM
> To: php-general@xxxxxxxxxxxxx
> Subject:  Invalid Arguements
>
> I am still getting the Invalid arguement error on this implode:
>
> if (isset($_POST['BannerSize'])){$BannerSize =
> implode(',',$_POST['BannerSize']);} else {$BannerSize = "";}
>
> I have moved the ',', from the beginning to the end of the statement
> and
> nothing works is there any other way to do this, basically there is a
> form
> and the people entering work orders can select different sized banners
> they
> need, which goes into the db as text ....so...argh...

Take the time to read what people have suggested. I seem to remember
people asking you if you had run is_array() on your so-called array.
Well, if you didn't, and it's NOT an array, and therefore will NOT work
with implode(), then feel free to facepalm ahead of time.
---

<?php
       if(is_array($myvar)) {
               $newvar = implode(',', $myvar);
       } else {
               echo 'Cats and dogs living together! Mass hysteria!';
       }
?>

I believe something to that effect was posted, with fully intact code,
on the list. Not to be rude, but if you're tasked with PHP programming
and you don't understand what it is to run a function, you should
probably bone up on procedural fundamentals and PHP in general before
you go much further... or you're going to SERIOUSLY screw something up
and be at a loss as to what you did (or how to fix it). Again--I'm not
trying to be rude. I am giving honest advice.

http://www.w3schools.com/php

---

Bottom posting will prevail, damnit! :D

As for your error, it is generally good list etiquette (and will help you, as well!) to post THE ACTUAL CODE that threw the error instead of "here's my error message and what line it happened on." We don't know the code on that line in question. We don't know the context (code surrounding it). As such, it is very difficult to derive anything whatsoever from your error message.

Details!

Also--if you're versed in Classic ASP, is PHP seriously all that different? Their function declarations and usage, opening/closing delimiters (<% and <?), etc. are all incredibly similar... anyway, I digress.

It looks like you probably forgot to put something inside quotation marks, or some of your mark-up bled through into your code. Hard to tell, as I said, with just the error message.


// Todd

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux