Hello List,
i am running PHP 5.3.8-FPM (with ondemand patch) in debug mode and got this
error every time I post an reply in vBulletin Board:
Warnung: String is not zero-terminated
(Z.ý4 ý4 ú}µóU) (source:
/usr/src/php-5.3.8/Zend/zend_execute_API.
I'm not sure as to why strpos does what it does here, at least its not
immediately obvious, but, a solution to this would be to use a regular
expression search, it would be more exact, it has never failed me, and it will
be faster; I recall reading that preg functions were faster at then str one
On 16 March 2011 00:25, Jack wrote:
>> Here you're trying to access it as an array, which it's not, so the
> 'response'
>> key doesn't exist. In addition, you're looking for UPPER-CASE, whereas
> that's
>> not the case in your example variable.
>> Finally, you're checking to make sure that th
> Here you're trying to access it as an array, which it's not, so the
'response'
> key doesn't exist. In addition, you're looking for UPPER-CASE, whereas
that's
> not the case in your example variable.
> Finally, you're checking to make sure that the string IS INDEED found, but
> then printing
On 16/03/2011, at 10:34 AM, Jack wrote:
> Hello All,
>
>
>
> I got some help on this yesterday, but somehow it's not consistant
>
>
>
>
>
>
> $results = "3434approd34";
>
>
>
> if(strpos($results['response'], 'APPROVED') !== false) {
>
>
>
> print "declined";
>
>
>
> } else {
On Tue, Mar 15, 2011 at 17:34, Jack wrote:
> Hello All,
>
>
>
> I got some help on this yesterday, but somehow it's not consistant
>
>
>
> $results = "3434approd34";
Here you're defining the variable as a string.
> if(strpos($results['response'], 'APPROVED') !== false) {
Here you're tr
Hello All,
I got some help on this yesterday, but somehow it's not consistant
The thing is I cant get a consistant response, if it has approved anywhere
in the results string, then it should be approved and if the results is
APPROVD without the E it shold be delined.
Am I doing
On 6 February 2011 15:57, Florin Jurcovici wrote:
> said it, Bush junior proved it
Is this actually part of the output?
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
> -Original Message-
> From: Florin Jurcovici [mailto:florin.jurcov...@gmail.com]
> Sent: 06 February 2011 15:57
> I'm trying to build myself a small JSON-RPC server using PHP.
>
> Using wireshark, here's the conversation:
>
> Request:
[...snip...]
> Response:
> HTTP/1.1 200 OK
Hi.
I'm trying to build myself a small JSON-RPC server using PHP.
Using wireshark, here's the conversation:
Request:
POST /.../service.php?nocache=1297004648751 HTTP/1.1
User-Agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.7.62
Version/11.01
Host: localhost
A
Marc Guay wrote:
1.) Saving strings to a database
One thing I always forget to remember is to send tge "SET NAMES utf8"
command to MySQL after making a connection. This will save you 1000
headaches if you're working with non-latin characters. I can't count
the number of times I've thrown html
> 1.) Saving strings to a database
One thing I always forget to remember is to send tge "SET NAMES utf8"
command to MySQL after making a connection. This will save you 1000
headaches if you're working with non-latin characters. I can't count
the number of times I've thrown htmlentities, htmlspec
Hello,
I don't yet have a complete understanding of string encodings for the
various environments they may need to pass through or be in. I have
found bits and pieces within Larry's book, the online docs, and by
googling... and
my app seems to be working fine, but I don't yet feel confident on
Nathan Nobbe wrote:
2. try modifying Tag & SelectBoxOption to have __construct() instead of
Tag() & SelectBoxOption(), then call parent::__construct() from inside
of SelectBoxOption::__construct(); see if that clears up your problem
under
5.2 (read: this will only be a partial solution as it on
David Harkness wrote:
I've never used the old-style constructors, but perhaps the semantics of
"parent::" changed and you need to instead use "$this->" as in
$this->Tag("option", $name);
That's a total guess. I don't have 5.2 handy to try it out, but both work in
5.3 using a simple example.
On Thu, Dec 16, 2010 at 3:21 PM, Kris Deugau wrote:
> Nathan Nobbe wrote:
>
>> Why not test for the type of $name at each point of interest in the
>> SelectBoxOption
>> constructor? If you're passing a string value to the constructor it
>> almost
>> has to be getting changed by the Tag construct
I've never used the old-style constructors, but perhaps the semantics of
"parent::" changed and you need to instead use "$this->" as in
$this->Tag("option", $name);
That's a total guess. I don't have 5.2 handy to try it out, but both work in
5.3 using a simple example. Can you post the constr
On Thu, Dec 16, 2010 at 4:04 PM, Kris Deugau wrote:
> Nathan Nobbe wrote:
>
>> probly something screwy going on w/ the old style of naming constructors.
>> 2
>> things,
>>
>> 1. can you post the Tag constructor as it reads now?
>>
>
> function Tag($tag='', $tagContent='') {
> $this->tagContent
Nathan Nobbe wrote:
probly something screwy going on w/ the old style of naming constructors. 2
things,
1. can you post the Tag constructor as it reads now?
function Tag($tag='', $tagContent='') {
$this->tagContent = $tagContent;
$this->tag = $tag;
$this->showEndTag = false;
$this->a
It's acting as if Tag's constructor a) declares $name as a reference using
&$name, and b) is assigning itself ($this) to $name for some (probably bad)
reason. That's the only way I can see that $name inside SelectBoxOption's
constructor could change from a string to an object.
A peek at Tag's cons
On Thu, Dec 16, 2010 at 3:21 PM, Kris Deugau wrote:
> Nathan Nobbe wrote:
>
>> Why not test for the type of $name at each point of interest in the
>> SelectBoxOption
>> constructor? If you're passing a string value to the constructor it
>> almost
>> has to be getting changed by the Tag construct
Nathan Nobbe wrote:
Why not test for the type of $name at each point of interest in the
SelectBoxOption
constructor? If you're passing a string value to the constructor it almost
has to be getting changed by the Tag constructor, right ?
class SelectBoxOption extends Tag {
function SelectBo
On Thu, Dec 16, 2010 at 2:29 PM, Kris Deugau wrote:
> Tommy Pham wrote:
>
>> class SelectBoxOption extends Tag {
>>> function SelectBoxOption($name, $value, $selected=false) {
>>> parent::Tag("option", $name);
>>> $this->addAttribute("value", $value);
>>> if($selected) {
>
Tommy Pham wrote:
class SelectBoxOption extends Tag {
function SelectBoxOption($name, $value, $selected=false) {
parent::Tag("option", $name);
$this->addAttribute("value", $value);
if($selected) {
$this->addAttribute("selected", '', false);
}
if ($name
> -Original Message-
> From: Kris Deugau [mailto:kdeu...@vianet.ca]
> Sent: Thursday, December 16, 2010 11:57 AM
> To: php-general@lists.php.net
> Subject: [PHP] String passed to object constructor turning into an
instance of
> that object?
>
> I'm in the
I'm in the process of migrating customer websites off an old legacy
server that's pushing EOL, and starting to show hardware failures.
One site is throwing errors on what, so far as I can tell, should be
perfectly working code.
The original code works fine on both CentOS 3 (PHP 4.3.2) and Cen
tedd wrote:
At 9:29 PM -0400 6/13/10, Robert Cummings wrote:
$parsed['pathbits'] = explode( '/', ltrim( dirname(
$parsed['path'] ), '/' ) );
return $parsed;
}
$url = my_parse_url( 'http://foo.fee.com/blah/bleh/bluh/meh.php' );
print_r( $url );
?>
Cheers,
Rob.
Rob:
Very neat.
It
At 9:29 PM -0400 6/13/10, Robert Cummings wrote:
$parsed['pathbits'] = explode( '/', ltrim( dirname(
$parsed['path'] ), '/' ) );
return $parsed;
}
$url = my_parse_url( 'http://foo.fee.com/blah/bleh/bluh/meh.php' );
print_r( $url );
?>
Cheers,
Rob.
Rob:
Very neat.
It also handle
On Sun, Jun 13, 2010 at 9:29 PM, Robert Cummings wrote:
> Rick Dwyer wrote:
>
>> Hello List.
>>
>> I need to parse the PATH portion of URL. I have assigned the path
>> portion to a variable using the following:
>>
>> $thepath = parse_url($url);
>>
>>
>> Now I need to break each portion of the pa
Rick Dwyer wrote:
Hello List.
I need to parse the PATH portion of URL. I have assigned the path
portion to a variable using the following:
$thepath = parse_url($url);
Now I need to break each portion of the path down into its own
variable. The problem is, the path can vary considerably
On Sun, 2010-06-13 at 18:52 -0400, Rick Dwyer wrote:
> OK, sorry for any confusion.
>
> Here is all my code:
>
> $url = "http" . ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".
> $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
> $thepath = parse_url($url);
>
> So, given that the URL can var
OK, sorry for any confusion.
Here is all my code:
$url = "http" . ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".
$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$thepath = parse_url($url);
So, given that the URL can vary as follows:
/mydirectory/mysubdirectory/anothersubdirectory/mypage.
On Jun 13, 2010, at 5:40 PM, Ashley Sheridan wrote:
On Sun, 2010-06-13 at 17:35 -0500, Karl DeSaulniers wrote:
On Jun 13, 2010, at 5:31 PM, Ashley Sheridan wrote:
> On Sun, 2010-06-13 at 17:27 -0500, Karl DeSaulniers wrote:
>
>> On Jun 13, 2010, at 5:23 PM, Ashley Sheridan wrote:
>>
>>> On S
On Sun, 2010-06-13 at 18:35 -0400, Rick Dwyer wrote:
> OK, I get the following error:
>
> Warning: basename() expects parameter 1 to be string, array given in
>
> When I use the following:
>
> $thepath = parse_url($url);
> $filename = basename($thepath);
>
> Is my variable thepath not auto
On Jun 13, 2010, at 5:35 PM, Rick Dwyer wrote:
OK, I get the following error:
Warning: basename() expects parameter 1 to be string, array given
in
When I use the following:
$thepath = parse_url($url);
$filename = basename($thepath);
Is my variable thepath not automatically string?
On Sun, 2010-06-13 at 17:35 -0500, Karl DeSaulniers wrote:
> On Jun 13, 2010, at 5:31 PM, Ashley Sheridan wrote:
>
> > On Sun, 2010-06-13 at 17:27 -0500, Karl DeSaulniers wrote:
> >
> >> On Jun 13, 2010, at 5:23 PM, Ashley Sheridan wrote:
> >>
> >>> On Sun, 2010-06-13 at 18:13 -0400, Rick Dwyer w
On Jun 13, 2010, at 5:35 PM, Rick Dwyer wrote:
OK, I get the following error:
Warning: basename() expects parameter 1 to be string, array given
in
When I use the following:
$thepath = parse_url($url);
$filename = basename($thepath);
Is my variable thepath not automatically string?
OK, I get the following error:
Warning: basename() expects parameter 1 to be string, array given in
When I use the following:
$thepath = parse_url($url);
$filename = basename($thepath);
Is my variable thepath not automatically string?
--Rick
On Jun 13, 2010, at 6:23 PM, Ashley Sheridan
On Jun 13, 2010, at 5:31 PM, Ashley Sheridan wrote:
On Sun, 2010-06-13 at 17:27 -0500, Karl DeSaulniers wrote:
On Jun 13, 2010, at 5:23 PM, Ashley Sheridan wrote:
On Sun, 2010-06-13 at 18:13 -0400, Rick Dwyer wrote:
Hello List.
I need to parse the PATH portion of URL. I have assigned th
On Sun, 2010-06-13 at 17:27 -0500, Karl DeSaulniers wrote:
> On Jun 13, 2010, at 5:23 PM, Ashley Sheridan wrote:
>
> > On Sun, 2010-06-13 at 18:13 -0400, Rick Dwyer wrote:
> >
> >> Hello List.
> >>
> >> I need to parse the PATH portion of URL. I have assigned the path
> >> portion to a variable
On Jun 13, 2010, at 5:23 PM, Ashley Sheridan wrote:
On Sun, 2010-06-13 at 18:13 -0400, Rick Dwyer wrote:
Hello List.
I need to parse the PATH portion of URL. I have assigned the path
portion to a variable using the following:
$thepath = parse_url($url);
Now I need to break each portion o
On Jun 13, 2010, at 5:13 PM, Rick Dwyer wrote:
Hello List.
I need to parse the PATH portion of URL. I have assigned the path
portion to a variable using the following:
$thepath = parse_url($url);
Now I need to break each portion of the path down into its own
variable. The problem is,
On Sun, 2010-06-13 at 18:13 -0400, Rick Dwyer wrote:
> Hello List.
>
> I need to parse the PATH portion of URL. I have assigned the path
> portion to a variable using the following:
>
> $thepath = parse_url($url);
>
>
> Now I need to break each portion of the path down into its own
> vari
Hello List.
I need to parse the PATH portion of URL. I have assigned the path
portion to a variable using the following:
$thepath = parse_url($url);
Now I need to break each portion of the path down into its own
variable. The problem is, the path can vary considerably as follows:
/myd
Ah, ok..
Turns out mine does too ;)
So for light apps, it can be considered a coder's preference then..
On Thu, Mar 11, 2010 at 9:16 AM, Ashley Sheridan
wrote:
>
> My editor highlights those strings even without me having to keep breaking
> out with concatenation Rene
>
On Thu, 2010-03-11 at 08:03 +0100, Rene Veerman wrote:
> $var = 'bla'.$var2.'doh'.$var3['index'].'argh'.$var4[$var4index];
>
> is so much more readable in any editor that does syntax highlighting,
> and parses quicker too.
>
> On Thu, Mar 11, 2010 at 1:15 AM, David Mehler wrote:
> > Hello,
> >
$var = 'bla'.$var2.'doh'.$var3['index'].'argh'.$var4[$var4index];
is so much more readable in any editor that does syntax highlighting,
and parses quicker too.
On Thu, Mar 11, 2010 at 1:15 AM, David Mehler wrote:
> Hello,
> I've got what is probably a very simple question, probably something
> h
On Thu, Mar 11, 2010 at 01:17:57AM +, Ashley Sheridan wrote:
>
> You're using single quotes in your string, so you can't have PHP parse
> the string for variables to extend into their corresponding values. If
> you wish to do that, use either double-quoted strings or heredoc/nowdoc
> syntax
On Wed, 2010-03-10 at 19:33 -0500, Adam Richardson wrote:
> Try this:
>
> ' .'/wp-content/themes/themestyle/white.css" rel="stylesheet" type="text/css"
> />';
>
> On Wed, Mar 10, 2010 at 7:15 PM, David Mehler wrote:
>
> > Hello,
> > I've got what is probably a very simple question, probably so
Try this:
'';
On Wed, Mar 10, 2010 at 7:15 PM, David Mehler wrote:
> Hello,
> I've got what is probably a very simple question, probably something
> having to do with quotes single vs. double, but the answer is
> frustrating elusive, I keep getting a syntax error.
> I'm trying to customize a wo
Hello,
I've got what is probably a very simple question, probably something
having to do with quotes single vs. double, but the answer is
frustrating elusive, I keep getting a syntax error.
I'm trying to customize a wordpress theme a friend sent me. We're both
using apache as web server and php5, b
On Mon, 2009-11-30 at 09:40 -0800, aurfal...@gmail.com wrote:
> Hi Ash,
>
> Actually I need the if because the code will print out an empty line
> and add "sometext" to it.
>
> So without the if check for an empty line, at the end of the loop I'll
> get sometext. For example, if the file I
Hi Ash,
Actually I need the if because the code will print out an empty line
and add "sometext" to it.
So without the if check for an empty line, at the end of the loop I'll
get sometext. For example, if the file I am processing called
somename.txt has
a
b
c
in it. I'll have;
asomet
On Mon, 2009-11-30 at 09:04 -0800, aurfal...@gmail.com wrote:
> Hi Shawn,
>
> Your code looks cleaner then mine so i tried it and got the last entry
> in the txt file printed twice.
>
>
> On Nov 30, 2009, at 7:07 AM, Shawn McKenzie wrote:
>
> > aurfal...@gmail.com wrote:
> >> So here is my f
Hi Shawn,
Your code looks cleaner then mine so i tried it and got the last entry
in the txt file printed twice.
On Nov 30, 2009, at 7:07 AM, Shawn McKenzie wrote:
aurfal...@gmail.com wrote:
So here is my final test code, notice the check for ' ' in the if.
Since I'm on Linux, this has to
aurfal...@gmail.com wrote:
> So here is my final test code, notice the check for ' ' in the if.
>
> Since I'm on Linux, this has to do with whats between the last LF and
> EOF which is nothing but this nothing will get printed out.
>
> $file = fopen("somefile.txt", "r");
> while (! feof($file))
>
So here is my final test code, notice the check for ' ' in the if.
Since I'm on Linux, this has to do with whats between the last LF and
EOF which is nothing but this nothing will get printed out.
$file = fopen("somefile.txt", "r");
while (! feof($file))
{
$names = trim(fgets(
On Nov 24, 2009, at 5:52 PM, ryan wrote:
Is this what you want
$file = fopen("test.txt", "r");
while (!feof($file)) {
$line = trim(fgets($file));
print $line."sometext\n";
}
fclose($file);
outputs
asometext
bsometext
csometext
Ref to http://us3.php.net/manual/en/function.fgets.php. "Rea
On Nov 24, 2009, at 5:55 PM, Nirmalya Lahiri wrote:
--- On Wed, 11/25/09, aurfal...@gmail.com wrote:
From: aurfal...@gmail.com
Subject: [PHP] string concatenation with fgets
To: php-general@lists.php.net
Date: Wednesday, November 25, 2009, 7:00 AM
Hi all,
I'm trying to append some te
--- On Wed, 11/25/09, aurfal...@gmail.com wrote:
> From: aurfal...@gmail.com
> Subject: [PHP] string concatenation with fgets
> To: php-general@lists.php.net
> Date: Wednesday, November 25, 2009, 7:00 AM
> Hi all,
>
> I'm trying to append some text to what I read
Is this what you want
$file = fopen("test.txt", "r");
while (!feof($file)) {
$line = trim(fgets($file));
print $line."sometext\n";
}
fclose($file);
outputs
asometext
bsometext
csometext
Ref to http://us3.php.net/manual/en/function.fgets.php. "Reading ends
when /length/ - 1 bytes have
Hi all,
I'm trying to append some text to what I read from a file.
My code;
$file = fopen("foo.txt", "r");
while (!feof($file)) {
$line = fgets($file);
print $line."sometext";
}
fclose($file);
foo,txt;
a
b
c
d
e
f
g
And when I run the script, it looks like;
a
sometextb
2009/11/4 Nathan Rixham :
> Nick Cooper wrote:
>>
>> Hi,
>>
>> I was just wondering what the difference/advantage of these two
>> methods of writing a string are:
>>
>> 1) $string = "foo{$bar}";
>>
>> 2) $string = 'foo'.$bar;
>
> 1) breaks PHPUnit when used in classes (need to bug report that)
> 2)
emax.dk]
> Sent: Wednesday, October 28, 2009 10:18 AM
> To: Nick Cooper
> Cc: Jim Lucas; php-general@lists.php.net
> Subject: Re: [PHP] PHP String convention
>
> Hi Nick
>
> Nick Cooper wrote on 2009-10-28 17:29:
>
>> Thank you for the quick replies. I thought metho
Nick Cooper wrote:
Hi,
I was just wondering what the difference/advantage of these two
methods of writing a string are:
1) $string = "foo{$bar}";
2) $string = 'foo'.$bar;
1) breaks PHPUnit when used in classes (need to bug report that)
2) [concatenation] is faster (but you wouldn't notice)
Kim Madsen wrote:
Hi Nick
Nick Cooper wrote on 2009-10-28 17:29:
Thank you for the quick replies. I thought method 2 must be faster
because it doesn't have to search for variables in the string.
So what is the advantages then of method 1 over 3, do the curly braces
mean anything?
1) $string
On Wed, 2009-10-28 at 18:18 +0100, Kim Madsen wrote:
> Hi Nick
>
> Nick Cooper wrote on 2009-10-28 17:29:
>
> > Thank you for the quick replies. I thought method 2 must be faster
> > because it doesn't have to search for variables in the string.
> >
> > So what is the advantages then of method 1
The curly braces look like something from the smarty template engine.
Warren Vail
-Original Message-
From: Kim Madsen [mailto:php@emax.dk]
Sent: Wednesday, October 28, 2009 10:18 AM
To: Nick Cooper
Cc: Jim Lucas; php-general@lists.php.net
Subject: Re: [PHP] PHP String convention
Hi
Hi Nick
Nick Cooper wrote on 2009-10-28 17:29:
Thank you for the quick replies. I thought method 2 must be faster
because it doesn't have to search for variables in the string.
So what is the advantages then of method 1 over 3, do the curly braces
mean anything?
1) $string = "foo{$bar}";
2)
Nick Cooper wrote:
> 2009/10/28 Jim Lucas:
>> Nick Cooper wrote:
>>> Hi,
>>>
>>> I was just wondering what the difference/advantage of these two
>>> methods of writing a string are:
>>>
>>> 1) $string = "foo{$bar}";
>>>
>>> 2) $string = 'foo'.$bar;
>>>
>>> I always use method 2 but have been notici
On Wed, 2009-10-28 at 16:29 +, Nick Cooper wrote:
> 2009/10/28 Jim Lucas:
> > Nick Cooper wrote:
> >> Hi,
> >>
> >> I was just wondering what the difference/advantage of these two
> >> methods of writing a string are:
> >>
> >> 1) $string = "foo{$bar}";
> >>
> >> 2) $string = 'foo'.$bar;
> >>
2009/10/28 Jim Lucas:
> Nick Cooper wrote:
>> Hi,
>>
>> I was just wondering what the difference/advantage of these two
>> methods of writing a string are:
>>
>> 1) $string = "foo{$bar}";
>>
>> 2) $string = 'foo'.$bar;
>>
>> I always use method 2 but have been noticing method 1 more and more in
>>
Nick Cooper wrote:
> Hi,
>
> I was just wondering what the difference/advantage of these two
> methods of writing a string are:
>
> 1) $string = "foo{$bar}";
>
> 2) $string = 'foo'.$bar;
>
> I always use method 2 but have been noticing method 1 more and more in
> source code. Is this just user
[snip]I was just wondering what the difference/advantage of these two
methods of writing a string are:[/snip]
Method 2 is faster, YMMV.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I was just wondering what the difference/advantage of these two
methods of writing a string are:
1) $string = "foo{$bar}";
2) $string = 'foo'.$bar;
I always use method 2 but have been noticing method 1 more and more in
source code. Is this just user preference?
I would use a generic search
On Fri, 2009-09-11 at 11:03 +0100, Tom Chubb wrote:
> !niBgo
>
>
> /*
> $str = "Bingo!";
> str_shuffle($str);
> */
>
>
>
> :)
No, that won't work at all, it's in comments ;)
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
!niBgo
/*
$str = "Bingo!";
str_shuffle($str);
*/
:)
On Thu, Sep 10, 2009 at 8:57 PM, Ron Piggott wrote:
> Is there a function in PHP which scrambles strings?
>
> Example:
>
> $string = "Hello";
>
> Output might be: ehlol
>
> Ron
http://www.php.net/manual/en/function.str-shuffle.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Wow, I would never have even thought of that! Thanks!
Take care,
Floyd
On Aug 26, 2009, at 12:08 PM, Ashley Sheridan wrote:
On Wed, 2009-08-26 at 12:03 -0400, Floyd Resler wrote:
How can I take a mathematical formula that is in a string and have
the
result, product, sum, etc. returned? I
On Wed, 2009-08-26 at 12:03 -0400, Floyd Resler wrote:
> How can I take a mathematical formula that is in a string and have the
> result, product, sum, etc. returned? I did a search on the Web and
> couldn't find any suitable solutions.
>
> Thanks!
> Floyd
>
>
eval()
Thanks,
Ash
http://www
How can I take a mathematical formula that is in a string and have the
result, product, sum, etc. returned? I did a search on the Web and
couldn't find any suitable solutions.
Thanks!
Floyd
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.ph
Looks like what I did by using mm/dd/ was extra, which was probably why it
didn't work.
Thanks, looks like this is up and running now.
Alice
> CC: php-general@lists.php.net
> From: stu...@stuconnolly.com
> To: aj...@alumni.iu.edu
> Subject: Re: [PHP] String to Date C
Hi Alice,
Based on the string format that you mentioned (DD MMM YY - DAY) you
should be able to transform to any other date using the following:
$parts = explode(' ', '23 JUL 09 - THURSDAY');
echo date('m/d/Y', strtotime("{$parts[1]} {$parts[0]} {$parts[2]}"));
Cheers
Stuart
On 31 Jul 200
Hi, Guys:
I am trying to turn a prepared line into a date format, and the string looks
something like this: 23 JUL 09 - THURSDAY, and I am trying to change the
string to a mm/dd/ format that looks like 07/23/2009.
I tried to use strtotime() but it gave me nothing.
Here is the cod
2009/1/11 Ashley Sheridan :
> On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote:
>> On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote:
>> > Hello,
>> > I am trying yo get THIS:
>> > where ref_id = '1234'
>> > from this.
>> > $where="where ref_id="."'$Reference[$x][ref_id]'";
>> >
>> > but i cer
Ashley Sheridan wrote:
On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote:
On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote:
Hello,
I am trying yo get THIS:
where ref_id = '1234'
from this.
$where="where ref_id="."'$Reference[$x][ref_id]'";
but i certainly have a quote problem.
Any help?
On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote:
> On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote:
> > Hello,
> > I am trying yo get THIS:
> > where ref_id = '1234'
> > from this.
> > $where="where ref_id="."'$Reference[$x][ref_id]'";
> >
> > but i certainly have a quote problem.
> >
> >
On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote:
> Hello,
> I am trying yo get THIS:
> where ref_id = '1234'
> from this.
> $where="where ref_id="."'$Reference[$x][ref_id]'";
>
> but i certainly have a quote problem.
>
> Any help?
> Thanks
> Mike
>
>
>
>
It should look like this:
$where="whe
On Sun, Jan 11, 2009 at 8:59 AM, MikeP wrote:
> Hello,
> I am trying yo get THIS:
> where ref_id = '1234'
> from this.
> $where="where ref_id="."'$Reference[$x][ref_id]'";
>
> but i certainly have a quote problem.
>
> Any help?
> Thanks
> Mike
>
>
>
>
> --
> PHP General Mailing List (http://www.ph
On Jul 13, 2008, at 9:17 AM, Sudhakar wrote:
hi
i am writing a small application where a user enters a phrase in the
textfield and i would like to display all the files present in the
root
directory which consists of the keyword or keywords entered by the
user.
i have used a few comparis
On Sun, 2008-07-13 at 21:47 +0530, Sudhakar wrote:
> hi
>
> i am writing a small application where a user enters a phrase in the
> textfield and i would like to display all the files present in the root
> directory which consists of the keyword or keywords entered by the user.
>
> i have used a f
hi
i am writing a small application where a user enters a phrase in the
textfield and i would like to display all the files present in the root
directory which consists of the keyword or keywords entered by the user.
i have used a few comparison functions but i am not getting the expected
result.
couldn't strtotime() do this without any mods? I personally would try
that first...
On 6/30/08, Mark Bomgardner <[EMAIL PROTECTED]> wrote:
> I need to convert a date retrieved from user input to a mysql date. Here
> the problem, I need to convert one of three possible combinations, either
> 01/01
> -Original Message-
> From: Mark Bomgardner [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 30, 2008 3:58 PM
> To: php-general@lists.php.net
> Subject: [PHP] String to date
>
> I need to convert a date retrieved from user input to a mysql date.
> Here
> the pro
Mark Bomgardner <[EMAIL PROTECTED]> wrote:
> I need to convert a date retrieved from user input to a mysql date. Here
> the problem, I need to convert one of three possible combinations, either
> 01/01/2008,01-01-2008 or 01.01.2008. I can't use explode because it's
> limited to one charact
On Mon, Jun 30, 2008 at 4:58 PM, Mark Bomgardner <[EMAIL PROTECTED]>
wrote:
> I need to convert a date retrieved from user input to a mysql date. Here
> the problem, I need to convert one of three possible combinations, either
> 01/01/2008,01-01-2008 or 01.01.2008. I can't use explode because it
I need to convert a date retrieved from user input to a mysql date. Here
the problem, I need to convert one of three possible combinations, either
01/01/2008,01-01-2008 or 01.01.2008. I can't use explode because it's
limited to one character to explode on. I would prefer not to use regexp,
but t
Chris W wrote:
I need to find the position of the first character in the string
(searching from the end) that is not one of the characters in a set. In
this case the set is [0-9a-zA-z-_]
I guess to be even more specific, I want to split a string into to parts
the first part can contain anything
On Sat, May 17, 2008 at 2:17 AM, Chris W <[EMAIL PROTECTED]> wrote:
> I need to find the position of the first character in the string
> (searching from the end) that is not one of the characters in a set. In
> this case the set is [0-9a-zA-z-_]
To find the position of a specific character, R
I need to find the position of the first character in the string
(searching from the end) that is not one of the characters in a set. In
this case the set is [0-9a-zA-z-_]
I guess to be even more specific, I want to split a string into to parts
the first part can contain anything and the second
1 - 100 of 590 matches
Mail list logo