On 7/2/2012 7:15 PM, Robert Williams wrote:
I found this code in a user comment in the PHP docs for htmlentities():
$v)
$trans[$k]= "".ord($k).";";
return strtr($string, $trans);
}
?>
It seems to work. For instance, this (assuming UTF-8 encoding):
echo xml_character_encode('Château');
echo
I found this code in a user comment in the PHP docs for htmlentities():
$v)
$trans[$k]= "".ord($k).";";
return strtr($string, $trans);
}
?>
It seems to work. For instance, this (assuming UTF-8 encoding):
echo xml_character_encode('Château');
echo "\n";
echo xml_character_encode('Ch&teau');
On 07/02/2012 03:38 PM, Scott Baker wrote:
On 07/02/2012 03:34 PM, Matijn Woudt wrote:
Why the would you want to return 2 columns with the same name?
To be short, there's no such function, so you have to:
1) Rename one of the columns
2) or, use fetch_row with numerical indexes instead of fe
On Tue, Jul 3, 2012 at 12:38 AM, Scott Baker wrote:
> On 07/02/2012 03:34 PM, Matijn Woudt wrote:
>> Why the would you want to return 2 columns with the same name?
>> To be short, there's no such function, so you have to:
>> 1) Rename one of the columns
>> 2) or, use fetch_row with numerical
On 07/02/2012 03:34 PM, Matijn Woudt wrote:
> Why the would you want to return 2 columns with the same name?
> To be short, there's no such function, so you have to:
> 1) Rename one of the columns
> 2) or, use fetch_row with numerical indexes instead of fetch_assoc.
My "real world" scenario w
On Tue, Jul 3, 2012 at 12:25 AM, Scott Baker wrote:
> $sql = "SELECT First, Last, Age, 'Foobar' AS Last;";
>
> This is a simplified example of a SQL query where we're returning two
> fields with the same name (Last). When I do a fetch_assoc with this
> query I only get three fields, as the second
$sql = "SELECT First, Last, Age, 'Foobar' AS Last;";
This is a simplified example of a SQL query where we're returning two
fields with the same name (Last). When I do a fetch_assoc with this
query I only get three fields, as the second "Last" field over writes
the first one.
I was hoping there wa
That worked just perfectly. Thank you.
-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel
Brown
Sent: Monday, July 02, 2012 3:02 PM
To: Rob Weissenburger
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Time
On Mon, Jul 2, 2012 at 4:00 PM, Rob
On Mon, 2 Jul 2012, Rob Weissenburger wrote:
I know php time() gives the current unix time which you can format out to
a normal date and time. Is there a way to format a specific date and time
back to unix time?
mktime() and strtotime() will do it, depending on the form your time is
in. The
On Mon, Jul 2, 2012 at 4:00 PM, Rob Weissenburger wrote:
> Hello everyone,
>
> I know php time() gives the current unix time which you can format out to
> a normal date and time. Is there a way to format a specific date and time
> back to unix time?
Yup. Look at strtotime() and mktime():
Hello everyone,
I know php time() gives the current unix time which you can format out to
a normal date and time. Is there a way to format a specific date and time
back to unix time?
Thanks for any help.
On Mon, Jul 2, 2012 at 2:54 PM, Ron Piggott
wrote:
Is there a way to test a variable contains a valid date
- 4 digits for the year
- 2 digits for the month (including leading 0)
- 2 digits for the day (including leading 0)
OR
- a function?
You may want to check out checkdate():
h
On Mon, Jul 2, 2012 at 2:54 PM, Ron Piggott
wrote:
>
> Is there a way to test a variable contains a valid date
> - 4 digits for the year
> - 2 digits for the month (including leading 0)
> - 2 digits for the day (including leading 0)
>
> OR
>
> - a function?
You may want to check out checkdate
On Mon, Jul 2, 2012 at 1:58 PM, Nick Chalk wrote:
> Afternoon all.
>
> I seem to be having a little trouble with extending the
> SimpleXMLElement class. I would like to add a destructor to the
> subclass, but am finding that it is not called.
>
> Attached is a minimal demonstration of the problem.
Hi,
First a message to the ones that have responded before me:
You're correct about the nested php tags that are not doing what the
OP wanted, but you might want to take a closer look at the error
that's in the logs. In ANY CASE PHP SHOULD NOT CRASH. What if the OP
really wanted to print PHP tags
On Mon, Jul 2, 2012 at 3:23 PM, Mihamina Rakotomandimby
wrote:
> On 06/30/2012 09:32 PM, Daniel Brown wrote:
>>>
>>> >> $ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk
>>> {'print $1,$2,$3 "|" $5 "|" $11'}`));
>
>
> This will tail a default number of lines.
>
> I'm looking for a wa
Greetings,
I have a site that I am developing and I am looking to partner/
developer with great php/mySQL skills (for share of potential profits)
to assist me in finishing this site. I am looking for someone who can
invest (like myself) their time and skills to complete the site in
exchang
On Sat, Jun 30, 2012 at 8:00 PM, Tim Dunphy wrote:
> Hello,
>
> I am trying to get the hang of php using some examples that I found
> in a book. I've been making progress lately, but one thing has me a
> bit stumped.
>
>
> In an HTML form that I am echoing through PHP I would like to embed
> smal
On 06/30/2012 09:32 PM, Daniel Brown wrote:
This will tail a default number of lines.
I'm looking for a way to identify the last line, and when launching the
PHP script I get the added line between now and that last one.
There is a "logtail" utility in the "logtool" package, but I want a fu
Interesting problem. I would expect it to work too. I assume it is a bug.
2012/7/2 Nick Chalk
> Afternoon all.
>
> I seem to be having a little trouble with extending the
> SimpleXMLElement class. I would like to add a destructor to the
> subclass, but am finding that it is not called.
>
> Atta
Afternoon all.
I seem to be having a little trouble with extending the
SimpleXMLElement class. I would like to add a destructor to the
subclass, but am finding that it is not called.
Attached is a minimal demonstration of the problem. The XMLConfig
class extends SimpleXMLElement, and its destruct
> -Original Message-
> From: Tim Dunphy [mailto:bluethu...@gmail.com]
> Sent: 28 June 2012 01:18
>
> Hey guys,
>
> It's been a little while since I've toyed with this, and I hope you
> don't mind my coming back to you for some more advice. But I've
> enjoyed some limited success with Davi
On Sun, Jul 1, 2012 at 6:21 PM, RGraph.net support wrote:
> Just thought I'd say hello again. Back to brush up on my PHP a little
> after a bit of a break - more reading than replying I'd imagine. I
> have some pretty bad jokes too that I might surreptitiously insert
> here and there...
Welcome b
23 matches
Mail list logo