RE: [PHP] Array find a element

2003-02-05 Thread mattias
You can use in_array (http://www.php.net/function.in_array) for this. -- Mattias --|-Original Message- --|From: Narciso Miguel Rodrigues --|[mailto:[EMAIL PROTECTED]] --|Sent: Wednesday, February 05, 2003 02:03 --|To: [EMAIL PROTECTED] --|Subject: [PHP] Array find a element

RE: [PHP] Best way to include multi-lingual support in an application.

2003-02-05 Thread mattias
There is gettext support in php for this. Haven't used it myself, but check it out at http://www.php.net/ref.gettext -- Mattias --|-Original Message- --|From: JJ Harrison [mailto:[EMAIL PROTECTED]] --|Sent: Wednesday, February 05, 2003 06:56 --|To: [EMAIL PROTECTED] --|Subject:

[PHP] Php error

2009-01-24 Thread mattias
ERR_DB_NO_DB_PASS What will this meen? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Php exec

2007-12-23 Thread mattias
If i use courier-mta Can i create a php script wich create mailboxes? And users Hope any understand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] Re: Php exec

2007-12-23 Thread mattias
? mattias schreef: > If i use courier-mta > Can i create a php script wich create mailboxes? > And users > Hope any understand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To

[PHP] Mail system

2007-12-30 Thread mattias
If i run coureir and postfix I want to have a signup script How should the code be written? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] Mail system

2007-12-30 Thread mattias
First of all If you have a bad day don't send to the list -Ursprungligt meddelande- Från: Stut [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2007 21:46 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: [PHP] Mail system mattias wrote: > If i run coureir and pos

SV: SV: [PHP] Mail system

2007-12-30 Thread mattias
Yes but i are newbie in php I think i should use php exec but i dont know no more -Ursprungligt meddelande- Från: Stut [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2007 22:01 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: SV: [PHP] Mail system mattias wrote: > First

[PHP] Sql support

2008-01-24 Thread mattias
I try to add php-support to my php installation on windows 2000 server Can someone check my phpinfo.php? http://mjw.se/phpinfo.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] Sql support

2008-01-24 Thread mattias
oops sorry i meen sql -Ursprungligt meddelande- Från: Chris [mailto:[EMAIL PROTECTED] Skickat: den 25 januari 2008 00:06 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: [PHP] Sql support mattias wrote: > I try to add php-support to my php installation on windows 2000 server

SV: SV: [PHP] Sql support

2008-01-24 Thread mattias
yes but if you check my phpinfo.php http://mjw.se/phpinfo.php i can't reed out if sql support are enabled -Ursprungligt meddelande- Från: Chris [mailto:[EMAIL PROTECTED] Skickat: den 25 januari 2008 01:18 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: SV: [PHP] Sql su

SV: SV: SV: [PHP] Sql support

2008-01-25 Thread mattias
hereis my php.ini i think this file are correct [PHP] ;;; ; About php.ini ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path desig

[PHP] verification of mail success

2006-02-23 Thread mattias
ctically valid) name returned "success"... Running mailq at the command prompt gives me: "(Host or domain name not found. Name service error for name=activeagenda.org type=MX: Host not found, try again)" Basically, I'd like my PHP script to know of issues like these.

Re: [PHP] web database template

2006-02-14 Thread mattias
CRIBE ; or: SHOW CREATE TABLE ; The second of these will give you a CREATE TABLE sql statement which would create that table. Best, Mattias Thorslund, http://www.activeagenda.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Good success with sysvmsg!

2003-02-04 Thread Mattias Nilsson
00 writes/reads per second sometimes, and I think good credit should go to the one that wrote the extension(Wez?). -- Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] mysql_real_escape_string() ?

2002-06-18 Thread Mattias Eriksson
>Does mysql_real_escape_string exist? I've seen it in the manual pages, and >to my understanding, it is the proper function to call on strings to escape >them before inserting them into a database... mysql_real_escape_string() is only available in CVS version. _____ Ma

RE: [PHP] SNMP -> LOG

2002-07-15 Thread Mattias Eriksson
Here is a example using snmprealwalk() to make a simple dump to a textfile. The script filters out some things that atleast I don't need. To get more verbose output comment out "$walk = snmp_nice_array($walk);" and/or change "snmp_set_quick_print(1);" to "snmp_set_quick_print(0);". Example with

SV: [PHP] Filesystem security

2001-04-26 Thread Mattias Segerdahl
10x? That a CD Player speed or something!? Quit the kiddie talk, use english! -Ursprungligt meddelande- Från: Anton G. Popov [mailto:[EMAIL PROTECTED]] Skickat: den 26 april 2001 10:45 Till: [EMAIL PROTECTED] Ämne: [PHP] Filesystem security Hi I have to set up a site for free web host

[PHP] Reading mime attachments into a rdbms

2001-05-03 Thread Mattias Segerdahl
I know that I should look for "#$message .= (Content-Disposition: attachment; filename="") in some way, but I don't know how, or where to go from there. Thanks in advance, // Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

SV: [PHP] Help plz!

2001-05-03 Thread Mattias Segerdahl
Wrong place to search for help with this kind of problem... 1) Reboot your computer 2) Call your tech support 3) Call Microsoft tech support 4) Reinstall the browser 5) Don't ever ask questions like these again // Mattias PS. Nothing personal DS. -Ursprungligt meddelande- Från:

[PHP] Download files extracted from db using Internet Exploded

2001-05-07 Thread Mattias Segerdahl
Now, it seems like Internet Explorer really wants me to click open once before actually choosing either to open or save it.. Does anyone know how to solve this problem, I don't want the users to have to figure out this "workaround" by themselves... // Mattias -- PHP General Mailing

SV: [PHP] Cant add new Header

2001-05-07 Thread Mattias Segerdahl
Make sure you're not sending any output to the browser, not even the body tag, before you send the header(); -Ursprungligt meddelande- Från: elias [mailto:[EMAIL PROTECTED]] Skickat: den 7 maj 2001 22:43 Till: [EMAIL PROTECTED] Ämne: Re: [PHP] Cant add new Header you can always redirect

[PHP] IMAP/POP3/OUTLOOK Question

2001-05-14 Thread Mattias Segerdahl
with over 20,000 emails in it, and outlook goes through these in less than a few seconds, so, could anyone explain to me how this is done. // Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To co

[PHP] IMAP/POP3/OUTLOOK Question .. NEW! ... Complimantary

2001-05-14 Thread Mattias Segerdahl
with over 20,000 emails in it, and outlook goes through these in less than a few seconds, so, could anyone explain to me how this is done. NEW PART: This is if I've set the outlook client not to delete the email from the pop server, or I've choosen to leave the message for x number of day

[PHP] imap_uid()

2001-05-14 Thread Mattias Segerdahl
sequencial number, starting from 1, instead of numbers I want, like, 3afffb530001, etc. etc. Does anybody know why? // Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list admi

[PHP] imap_compose_mail attachment filename, disponition

2001-05-17 Thread Mattias Segerdahl
Hi, Here I am again, having problems with the c-client and the wrap around it, this time with the imap_mail_compose()... To start out with, the imap functions really need more documentation, I've been working with the imap functions for about two weeks, and for almost each and every function, I'v

[PHP] multi-threading within php?

2002-01-24 Thread Mattias Andersson
ks from it, then downloads those pages, extract their links, until all pages on a site has been downloaded and archived. Is there any way to do it in several threads so that it handles several connections simultaneously? If it would dynamically allocate threads that would be even better. Regard

SV: [PHP] multi-threading within php?

2002-01-24 Thread Mattias Andersson
does lack multi-threading though, it might just be me that doesn't know about it. Is there any way to execute several functions simultaneously? Mvh, Mattias Andersson Mjukvaruutvecklare, humany AB Direkt: 08-4540701 Mobil: 0704-526685 -Ursprungligt meddelande- Från: bvr [mailto:[EMAIL

SV: [PHP] Re: Lists are back up

2001-06-19 Thread Mattias Segerdahl
For all those that's seeking support for php, there are two options, zend.com sells SOS, you could also join #php on efnet for help.. // bad2da -Ursprungligt meddelande- Fran: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Skickat: den 19 juni 2001 05:31 Till: Miles Thompson Kopia: [EMAIL PRO

[PHP] [PHP-WIN] Problems running php from samba network shares...

2001-06-25 Thread Mattias Segerdahl
Hello all, I have a slight problem that someone out there might be able to help me with. I recently installed Windows 2000 with Internet Information Server 5.0 and php 4.0.7-dev. When configuring the IIS 5.0 default webserver, I did the following => Properties => Directory Security => Edit => An

SV: [PHP] [PHP-WIN] Problems running php from samba network shares...

2001-06-27 Thread Mattias Segerdahl
Ofcourse not! I'm accessing the files from the webbserver, not a network share. Which if I was would display the source. Mattias -Ursprungligt meddelande- Från: Jason Murray [mailto:[EMAIL PROTECTED]] Skickat: den 26 juni 2001 08:35 Till: 'Mattias Segerdahl'; php general

SV: [PHP] [PHP-WIN] Problems running php from samba network shares...

2001-06-28 Thread Mattias Segerdahl
There arn't any permission problems, since we're already getting php to run, could it be that php 4.0.6 under windows dosn't support UNC paths.. Iow, \\server\share\name paths!? -Ursprungligt meddelande- Från: Richard Lynch [mailto:[EMAIL PROTECTED]] Skickat: den 27 juni 2001 07:12 Till:

RE: [PHP] Code Red Catcher

2001-09-10 Thread Mattias Segerdahl
Why invent the wheel twice, this has been around since the first day code red was discovered.. See code-red.php -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: den 10 september 2001 16:22 To: [EMAIL PROTECTED] Subject: [PHP] Code Red Catcher Hi All! I had

RE: [PHP] Code Red Catcher

2001-09-10 Thread Mattias Segerdahl
Hey, Don't bitch about my grammar, I was in a hurry when writing this script... Bad2da / efnet #php -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: den 10 september 2001 17:50 To: [EMAIL PROTECTED] Subject: [PHP] Code Red Catcher Hi again, Everyone: I didn

Re: [PHP] is there a more efficient query?

2004-08-07 Thread Mattias Jönsson
Well i havent seen anyone been using BETWEEN. Anyway... $SQL = mysql_query("SELECT value FROM table_name WHERE element BETWEEN 48 AND 53"); while($row = mysql_fetch_arrray($SQL)) { print($row['value']); } mysql_free_result($SQL); ?> From: "Jason Davidson" <[EMAIL PROTECTED]> To: "Brian Tully"

[PHP] SQL Join query

2004-08-07 Thread Mattias Jönsson
I have a problem with my mysql query SELECT pics.*, pic_comments.*, count(*) AS num_comments FROM pics, pic_comments WHERE pics.category = 1 AND pics.id = pic_comments.pic_id GROUP BY pic_comments.pic_id; pics table: | id | submitter | time | date | category | pic_comments table: | pic_id | comm

Re: [PHP] SQL Join query

2004-08-07 Thread Mattias Thorslund
ount(*) AS num_comments FROM pic_comments GROUP BY pic_id You may want to add an ORDER BY clause to both of these. People often say it's 'good form' to enumerate your fields in the SELECT clause but benefits of that may vary between database platforms. Mattias Thorslund -- PHP G

Re: [PHP] SQL Join query

2004-08-09 Thread Mattias Thorslund
(Sorry about all the quoting but I thought it makes sense for clarity - Mattias) Curt Zirzow wrote: * Thus wrote Lenar Lhmus: Mattias Thorslund wrote: Though, (regardless of SQL database platform) in a case like this, it MAY be both more straightforward and efficient to use two separate

Re: [PHP] downloading files

2004-08-19 Thread Mattias Thorslund
) /documents (put uploaded documents here) /webroot (web-accessible files here) /img(static images) /js (javascript files) Hope this helps. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: **[SPAM]** [PHP] Correct context

2004-09-20 Thread Mattias Thorslund
|| ("Price Change" != $entry))) Note the parentheses to define preference order. How about : if("" != $row['photo_check'])){ switch($entry){ case "Copy Change": case "Banner Change": case "Price Change": break; default: //put

Re: [PHP] RE: **[SPAM]** [PHP] Correct context

2004-09-20 Thread Mattias Thorslund
Mattias Thorslund wrote: Disclaimer: I have probably left a silly typo somewhere. Sure did: My old nemesis, end parethesis (either too few or too many). It should be: if("" != $row['photo_check']){ switch($entry){ case "Copy Change": case "Ba

Re: [PHP] RE: Correct context

2004-09-20 Thread Mattias Thorslund
Jay Blanchard wrote: Oops Yeah, some of us (including myself) could use a php validator in our mail clients... Maybe a plugin for T-bird? /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Recommendations for php email list managers?

2004-09-21 Thread Mattias Thorslund
send my newsletter. It's supposed to be an announcement-only list, BTW. /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Recommendations for php email list managers?

2004-09-21 Thread Mattias Thorslund
Manuel Lemos wrote: Hello, On 09/21/2004 04:17 PM, Mattias Thorslund wrote: I'm trying to set up a list manager on a hosted site. PHPlist (phplist.com) seemed promising but I read on their forums that it takes some users hours and hours to send a couple thousand emails. Without ter

Re: [PHP] Re: Recommendations for php email list managers?

2004-09-21 Thread Mattias Thorslund
Matthew Weier O'Phinney wrote: * Mattias Thorslund <[EMAIL PROTECTED]>: I'm trying to set up a list manager on a hosted site. PHPlist (phplist.com) seemed promising but I read on their forums that it takes some users hours and hours to send a couple thousand emails. Without

Re: [PHP] Form Validation

2004-10-13 Thread Mattias Thorslund
e the data in your PHP script as you process the form. Oh, and there are several PHP-based list managers available, for instance phplist, so you may not need to program it yourself. /Mattias Huang, Ou wrote: I am currently working on a newsletter mailing list project and developed a form in p

Re: [PHP] Using MDB2 outside the PEAR framework?

2008-12-26 Thread Mattias Thorslund
As far as I recall, having done this, all that is required for a basic MDB2 is the PEAR base class and the driver classes for the platforms you want to support. Murray wrote: Hi All, I'm wondering if it's possible or practical to implement MDB2 in my web application, but without requiring a

Re: [PHP] Re: hello - thread on topic or not?

2009-01-08 Thread Mattias Thorslund
I thought this was the PHP list, not the OS vs. OS list? Is this type of discussion now considered OK here? I recall people getting flamed for borderline off-topic posts even, just a few years ago. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] About printing functions

2009-01-21 Thread Mattias Thorslund
e function itself? And store the "blah blah blah" somewhere for later use? I can think of many reasons that someone could use this. Perhaps you are looking for what the output buffering functions do? http://us3.php.net/manual/en/book.outcontrol.php Cheers, Mattias -- PHP Genera

Re: [PHP] Re: Global Changes With Loop To Allow Nulls In A Table...

2009-01-27 Thread Mattias Thorslund
eems to be. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Sorting times

2009-02-15 Thread Mattias Thorslund
account for that, you solution won't be as elegant. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Handling (very) large files with PHP

2009-03-11 Thread Mattias Thorslund
epend a bit on the quality and consistency of your data. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Mattias Thorslund
users who encounter the same thing, so the easier the instructions and the less tinkering, the better. Is there a php.ini setting, for instance? What have you found that works for you? Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Mattias Thorslund
Andrew Ballard wrote: On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund wrote: Hi all, Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when running PHP on IIS as when running it on Apache. Specifically, it seems to contain the script name only, and not t

Re: [PHP] Script to Compare Database Structures

2009-08-02 Thread Mattias Thorslund
Look into the Reverse module of PEAR MDB2. http://pear.php.net/manual/en/package.database.mdb2.intro-reverse-module.php Cheers, Mattias Matt Neimeyer wrote: I know I CAN hack something together but I hate to reinvent the wheel. I want to be able to compare the structure of two different

Re: [PHP] APC optimization in CLI

2009-08-09 Thread Mattias Thorslund
named apc.enable_cli, which would suggest otherwise. I tried enabling it, and it seems my CLI script is a little faster actually. Highly unscientific but looks like about 10%. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
not available in all OSes, and that might not be the currently running executable anyway. I could prompt the user for this, but that seems kind of silly. Surely, there must be some way of looking it up automatically? Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
Jim Lucas wrote: > Mattias Thorslund wrote: >> Hi, >> >> I have looked in the documentation but can't find it: >> >> My PHP script (which is run from the command prompt - CLI) needs to know >> the file system location of the PHP executable. This is becau

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
gt; it's just a thought. > > > Unfortunately, I think it's not an option in my case. The sub-process I run this way are way, way too big to include in the main process. As long as I was just running it on my own systems, it was easy to hard-code the location of the PHP executable but now that it's being distributed, it needs to "just work"... Thanks again, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Validating XML Issue

2009-09-03 Thread Mattias Thorslund
I'd say your XML document is not "well formed", but validity depends on whether it conforms to the rules expressed in a schema. Mattias Alice Wei wrote: Hi, This seems like a small problem that I have read from http://us.php.net/manual/en/xmlreader.isvalid.php. I have t

Re: [PHP] Extract links from strings

2009-09-21 Thread Mattias Thorslund
he URL from these strings? They can be [http:// + url] or [www. + url]. Zechim Simple: function RemoveLorem($string) { return str_replace(array('Lorem ipsum dolor ', ' sit amet'), '', $string); } $url1 = RemoveLorem($string1); $url2 = RemoveLorem($string2); $u

[PHP] SimpleXML var_dump() weirdness

2009-10-13 Thread Mattias Thorslund
SimpleXMLElement)#1 (2) { ["@attributes"]=> array(1) { ["rootattr"]=> string(10) "root value" } ["inner"]=> object(SimpleXMLElement)#2 (2) { ["@attributes"]=> array(1) { ["attr"]=> string(5) "value&q

Re: [PHP] Re: Time zone discrepancy - America/New_York = CDT?

2009-11-01 Thread Mattias Thorslund
The output I get (after adding newlines to the output) is: America/New_York EST EST EST PHP 5.2.10. I suspect this comes from the operating system. Maybe update your tzdata package if you're on a Linux system. Cheers, Mattias Nathan Lebovic wrote: Sorry there was a typo in that o

Re: [PHP] Server-side encryption to prevent form hacking: new idea?

2009-12-11 Thread Mattias Thorslund
es aren't limited to a small set, so it's more practical to check for expected length, data type, and escape the data before saving it. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Resin/Quercus

2010-01-06 Thread Mattias Thorslund
Hi, I wonder if anyone has experience with running PHP on the Resin server. Opinions, good, bad? Gotchas? Similar projects? http://www.caucho.com/projects/resin/ Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POLL: To add the final ?> or not...

2010-01-08 Thread Mattias Thorslund
tes as XML but anyway. Cheers, Mattias Daevid Vincent wrote: I'm having a debate with a co-worker about adding the final ?> on a PHP page... To be honest, I am the lead, and I could pull rank and be done with the discussion, however I don't like to be that way. I would rather do t

Re: [PHP] Formatting Decimals

2010-01-10 Thread Mattias Thorslund
.@mumin:~$ php -r 'echo "$".number_format("0.109", 2, ".", ",")."\n";' $0.11 I think the $ should be escaped with a backslash when enclosed within double quotes, but even the second and third tries return the correct result for me. U

Re: [PHP] Formatting Decimals

2010-01-11 Thread Mattias Thorslund
look like: Actual Rounded Diff .011 .010-.001 .012 .010-.002 .013 .015+.002 .014 .015+.001 .015 .015 .000 .016 .015-.001 .017 .020-.002 .018 .020+.002 .019 .020+.001 .020 .020 .000 Bias.000 The only difference is the case wh

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Mattias Thorslund
Kim Madsen wrote: Mattias Thorslund wrote on 09/01/2010 02:26: A neat thing with pairing every when mixed in HTML is that these are valid XML processing instructions. If your HTML satisfies XML well-formedness, your PHP document will also be valid XML. Not that I've ever had any ne

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-18 Thread Mattias Thorslund
() didn't work for you? http://www.php.net/fgetcsv Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Mattias Thorslund
also help you convert your database from one platform to another, since it also provides methods for detecting and managing the database structure itself (the Manager and Reverse modules). That said, if I were to start a new project at this time, I would look closer at whether PDO fits my needs.

Re: [PHP] Sort two coupled arrays

2010-04-07 Thread Mattias Thorslund
has to be a better/slicker way. Suggestions? Cheers, tedd array_combine($key_array, $value_array) :) -- Piero And then: krsort($combined_array); Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] floored by floor()

2010-10-13 Thread Mattias Thorslund
Hi List, I'm having a problem with the behavior of the floor() function: echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!! Sanity check: var_dump(327.03 * 100); //prints "float(32703)" as expected Any ideas why this happens,

Re: [PHP] floored by floor()

2010-10-14 Thread Mattias Thorslund
On 10/13/2010 11:56 PM, gaojian wrote: 在 2010-10-13三的 22:48 -0700,Mattias Thorslund写道: Hi List, I'm having a problem with the behavior of the floor() function: echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!! Sanity check: var_dump(3

Re: [PHP] floored by floor()

2010-10-14 Thread Mattias Thorslund
On 10/13/2010 11:14 PM, Glen Fuller wrote: On 10/13/2010 10:48 PM, Mattias Thorslund wrote: Hi List, I'm having a problem with the behavior of the floor() function: echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!! Sanity check: var_dump(3

[PHP] crash dump on OS X Server: PHP / Apache

2012-10-09 Thread Mattias Thorslund
erver, using the same FileMaker API is running just fine, but that one isn't using CodeIgniter. Any insight would be greatly appreciated. Mattias Process: httpd [9018] Path:/usr/sbin/httpd Identifier: httpd Version: ??? (???) Code Type: X86-64 (Native) Pare

Re: [PHP] A relative date puzzle

2013-04-01 Thread Mattias Thorslund
NIX time stamp, then use date() to format it as you like. $myDate = strtotime("wed 11:00 am"); //1365012000 echo date("Y-m-d H:i:s", $myDate); //2013-04-03 11:00:00 On two lines for clarity. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A relative date puzzle

2013-04-01 Thread Mattias Thorslund
On 4/1/13 11:15 AM, Mattias Thorslund wrote: On 4/1/13 11:05 AM, Jim Giner wrote: I'm looking for some ideas on how to handle the following get a datetime value that is relative to a specific future date when presented with a partial day &time value. Specifically, I have an

Re: [PHP] Friday's Question

2013-09-20 Thread Mattias Thorslund
40, and no mouse pad atm. Seems that this table top is okay. This is an optical mouse without a ball underneath. However this mac-y-mouse DOES have a ball on top, for scrolling. Go figure. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

RE: [PHP] Bar Charts in PDFs

2011-02-11 Thread Mattias Geniar
Hi Tom, Have a look at the library called 'pChart': http://pchart.sourceforge.net/ While it's a bit old, it generates very nice looking (anti aliased) charts, using the default GD library. Regards, Mattias -Original Message- From: Tom Barrett [mailto:t...@miramedia.co.uk]

Re: [PHP] How to PHP get bit depth of a given PNG image file?

2011-06-15 Thread Mattias Thorslund
mage. Reading the manual, it says: " channels will be 3 for RGB pictures and 4 for CMYK pictures. bits is the number of bits for each color. " So, to get the total bit depth, I think you need to multiply by the number of colors, which is in the "channels" element. Cheers

Re: [PHP] How to PHP get bit depth of a given PNG image file?

2011-06-16 Thread Mattias Thorslund
I think the documentation is a bit unclear about the fact that "colors" and "channels" are the same thing here. The line about bits should probably say "bits is the number of bits for each *channel*". Mattias On 06/15/2011 11:11 PM, Nam Gi VU wrote: Thank you Ma

Re: [PHP] Help on number matching function

2011-09-16 Thread Mattias Thorslund
If one or both of your data sets are in MySQL already, there may be no need to do the comparison in PHP. Just use IN() or INNER JOIN. Or is there some particular reason why neither of these will work in your case? Cheers, Mattias On 09/16/2011 05:36 AM, Dare Williams wrote: Dear PHP Group

Re: [PHP] Primer for working with arrays

2005-02-09 Thread Mattias Thorslund
pters. /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with a query please - unable to error check!

2005-02-16 Thread Mattias Thorslund
Could it be a quote-escaping problem? It would be easier to tell if you could show us the query and the code you're using. /Mattias Shaun wrote: Hi, I have a problem with a query, I get the following error message: You have an error in your SQL syntax. Check the manual that corresponds to

Re: [PHP] sentence case

2005-02-23 Thread Mattias Thorslund
Chris W. Parker wrote: Leif Gregory on Wednesday, February 23, 2005 10:31 AM said: I'm thinking something like: 1. strtolower() the string 2. explode() on the period 3. Loop through the resulting array a. trim() whitespace on each element b. ucfirst() on each el

Re: [PHP] sentence case

2005-02-23 Thread Mattias Thorslund
Leif Gregory wrote: Hello Chris, Wednesday, February 23, 2005, 11:49:32 AM, you wrote: C> And on top of that he'll need to convert all 'i' to 'I' because of C> step 1. You and Mattias both have valid points. The only other thing I can think of is a regexp that is sea

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] 'Insulate' db connection

2005-03-06 Thread Mattias Thorslund
Since you can use fopen, I don't think open_basedir is the problem. Read about open_basedir here: http://us3.php.net/features.safe-mode Maybe the path that you use in the include is wrong? /Mattias Andre Dubuc wrote: Hi, I am trying to 'insulate' my database connection from prying

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Re: Help with dates

2005-03-06 Thread Mattias Thorslund
nstant somewhere :) Can't be too hard to calculate it: 1970 * 365 + 1 day for each leap year. Note the rules for leap year, of course. /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: Help with dates

2005-03-06 Thread Mattias Thorslund
Check out: http://pear.php.net/package/Date According to the description, it lets you compare dates that date pre 1970 and post 2038. /Mattias (If I could only get off ezmlm's "suspicious user list". I think there isn't much I can do, it's my ISP rejecting some PHP lis

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Include file

2005-03-30 Thread Mattias Thorslund
an substituting double quotes with single quotes. /Mattias Thorslund -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Interesting, yet goofy behavior

2005-04-06 Thread Mattias Thorslund
ot; attribute of the form tag. Actually I wonder how much alcohol you've had by now... :-) /Mattias Jay Blanchard wrote: Let's say I have a form and the action is thus; \n"; Note the 'bid' attribute. Now, I have a case statement in which stuff takes place since the form

Re: [PHP] Interesting, yet goofy behavior

2005-04-06 Thread Mattias Thorslund
have to find another way around the situation then. Thanks! How about: If your Form tag appears after your switch/case statement, that is? But, first, do yourself and your project a favor and go grab something to eat. :-) /Mattias -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] SQL ternary thing

2005-04-06 Thread Mattias Thorslund
ement, but I believe that's not supported by other DBMS's. Something like: SELECT name, CASE value WHEN 1 THEN name_if_true WHEN 0 THEN name_if_false ELSE 'unknown' END AS result FROM thing; /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Mattias Thorslund
eys($object_array); $first_key = reset($keys); /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-08 Thread Mattias Thorslund
Chris W. Parker wrote: Read www.php.net/array_keys and you shall have your answer. From the php docs: $array = array(0 => 100, "color" => "red"); print_r(array_keys($array)); ?> Will output. Array ( [0] => 0 [1] => color ) Duh! Yes, I replied a li

Re: [PHP] Date class

2005-04-19 Thread Mattias Thorslund
lcome. Thanks for your time in advance. Devraj Have you looked at the PEAR Date class? http://pear.php.net/package/Date /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Links exchange with http://php-faq.com. OT - SPAM

2005-04-19 Thread Mattias Thorslund
It would be nice if the above piece of blatant spam were removed from the archives, since the spammer's objective most likely is to improve their Google rank... Possible? /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Unexpected T_IF

2005-04-25 Thread Mattias Thorslund
ery($sql)) ) (snipped the rest of the code) Check that the line BEFORE the if statement ends with a semicolon (or otherwise ends correctly...). /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Templating engines

2005-04-28 Thread Mattias Thorslund
he actual template language. I haven't used in a production setting yet, and haven't compared its performance with other template systems. /Mattias P.S. Sorry for hijacking this thread, but it's closely related. OK, I wrote that before I read all the off-topic jokes in this thread. I

  1   2   >