Re: [PHP] templeting

2012-09-03 Thread Louis Huppenbauer
2012/9/4 tamouse mailing lists > On Mon, Sep 3, 2012 at 8:49 PM, David McGlone wrote: > > On Monday, September 03, 2012 09:45:23 PM David OBrien wrote: > >> On Sep 3, 2012 9:15 PM, "David McGlone" wrote: > >> > Does anyone use any templeting system for any projects? If so what > would > >> > an

Re: [PHP] templeting

2012-09-03 Thread tamouse mailing lists
On Mon, Sep 3, 2012 at 8:49 PM, David McGlone wrote: > On Monday, September 03, 2012 09:45:23 PM David OBrien wrote: >> On Sep 3, 2012 9:15 PM, "David McGlone" wrote: >> > Does anyone use any templeting system for any projects? If so what would >> > anyone recommend? I looked at Code Ignitor, but

Re: [PHP] load rtf file

2012-09-03 Thread tamouse mailing lists
On Mon, Sep 3, 2012 at 6:04 PM, Micky Hulse wrote: > On Mon, Sep 3, 2012 at 3:52 PM, Tedd Sperling wrote: >> Maybe if I was on a Windoze machine, but I'm on a Mac. > > What about TextEdit.app? Or Open/Libre Office? As for the OP, I know you can script Open/Libre Office with python to do things

Re: [PHP] templeting

2012-09-03 Thread David McGlone
On Monday, September 03, 2012 09:45:23 PM David OBrien wrote: > On Sep 3, 2012 9:15 PM, "David McGlone" wrote: > > Does anyone use any templeting system for any projects? If so what would > > anyone recommend? I looked at Code Ignitor, but it seems the templeting > > system is optional and left o

Re: [PHP] templeting

2012-09-03 Thread David OBrien
On Sep 3, 2012 9:15 PM, "David McGlone" wrote: > > Does anyone use any templeting system for any projects? If so what would > anyone recommend? I looked at Code Ignitor, but it seems the templeting system > is optional and left out by default. > > -- > Regards > David M. I use smarty

[PHP] templeting

2012-09-03 Thread David McGlone
Does anyone use any templeting system for any projects? If so what would anyone recommend? I looked at Code Ignitor, but it seems the templeting system is optional and left out by default. -- Regards David M.

Re: [PHP] load rtf file

2012-09-03 Thread Micky Hulse
On Mon, Sep 3, 2012 at 3:52 PM, Tedd Sperling wrote: > Maybe if I was on a Windoze machine, but I'm on a Mac. What about TextEdit.app? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] load rtf file

2012-09-03 Thread Tedd Sperling
On Sep 3, 2012, at 12:56 PM, Matijn Woudt wrote > > Just a side note tedd, couldn't you just open those RTF files with > wordpad? IIRC it supports RTF and plain text (even in Win7) > > - Matijn Maybe if I was on a Windoze machine, but I'm on a Mac. Cheers, tedd _ t...@

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
That works, thanks. I think I'll put this into MySQL eventually. "sort by" key would do it better, and I will need to more. Serge Fonville wrote: Sort does not maintain the association between key and value. Use asort to sort on value while maintaining the key. Kind regards/met vriendelijke

Re: [PHP] ksort by value

2012-09-03 Thread Stuart Dallas
On 3 Sep 2012, at 22:55, John Taylor-Johnston wrote: > http://php.net/manual/en/array.sorting.php is pretty clear. But my problem is > that sort ($freq) destroyed my key. Did you actually read it? There's a table on that page that summarises exactly what each sorting function does, with a colu

Re: [PHP] ksort by value

2012-09-03 Thread Serge Fonville
If you want to perform a count on all the unique values (in SQL Terms a group by and a count) use http://php.net/manual/en/function.array-count-values.php instead. Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PART

Re: [PHP] ksort by value

2012-09-03 Thread Serge Fonville
Sort does not maintain the association between key and value. Use asort to sort on value while maintaining the key. Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
Sort does not work seamlessly. I have my key and sort($freq); print_r ($freq); looks like: Array ( ... [1000] => 172 [1001] => 176 [1002] => 179 [1003] => 441 ) This is what I want: Array ( ...

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
Serge Fonville wrote: Have you looked at http://php.net/manual/en/array.sorting.php? 2012/9/3 John Taylor-Johnston > ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value t

Re: [PHP] ksort by value

2012-09-03 Thread Serge Fonville
Hi, Have you looked at http://php.net/manual/en/array.sorting.php? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-par

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value to see which words are more frequent. There is no |ascending/descending option to ksort?| ksort sorts by key, if you want by value, look at sort. As to asc/desc sort, they just have a differen

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value to see which words are more frequent. There is no |ascending/descending option to ksort?| ksort sorts by key, if you want by value, look at sort. As to asc/desc sort, they just have a differen

[PHP] mysql and php questions

2012-09-03 Thread Littlefield, Tyler
Hello all: I had a few questions. First, I'm using php-fastcgi with nginx for my primary web server. I was wondering what sorts of optimizations exist to make this process a lot faster. Second, I'm setting up a custom application, and it contains an authentication module for login/registration.

Re: [PHP] ksort by value

2012-09-03 Thread Matijn Woudt
On Mon, Sep 3, 2012 at 8:33 PM, John Taylor-Johnston wrote: > Hi, > > ... > $words = preg_split('/[[:space:]]+/',$mynewstring); > > foreach ($words as $word) { > $freq[$word]++; > } > > ksort($freq); > print_r ($freq); > ?> > > If I have my terminology right, ksort($freq) sorts the array by t

[PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
Hi, If I have my terminology right, ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value to see which words are more frequent. There is no |ascending/descending option to ksort?| Thanks, John Array ( [] => 1 [a] => 165 [about] => 4

Re: [PHP] load rtf file

2012-09-03 Thread David OBrien
On Mon, Sep 3, 2012 at 12:56 PM, Matijn Woudt wrote: > On Mon, Sep 3, 2012 at 5:24 PM, Tedd Sperling wrote: > > On Sep 3, 2012, at 1:23 AM, John Taylor-Johnston > wrote: > > > >> I have a big giant RTF file. I could convert it to plain text. BUT can > PHP do it for me? > > > > Hell, even M$ can

Re: [PHP] load rtf file

2012-09-03 Thread Matijn Woudt
On Mon, Sep 3, 2012 at 5:24 PM, Tedd Sperling wrote: > On Sep 3, 2012, at 1:23 AM, John Taylor-Johnston > wrote: > >> I have a big giant RTF file. I could convert it to plain text. BUT can PHP >> do it for me? > > Hell, even M$ can't do it! > > I have tons of old Word RFT files that were orphan

Re: [PHP] load rtf file

2012-09-03 Thread Tedd Sperling
On Sep 3, 2012, at 1:23 AM, John Taylor-Johnston wrote: > I have a big giant RTF file. I could convert it to plain text. BUT can PHP do > it for me? Hell, even M$ can't do it! I have tons of old Word RFT files that were orphaned by the installation of a newer of M$ Word. The upgrade actually

Re: [PHP] load rtf file

2012-09-03 Thread Matijn Woudt
On Mon, Sep 3, 2012 at 7:23 AM, John Taylor-Johnston wrote: > I have a big giant RTF file. I could convert it to plain text. BUT can PHP > do it for me? > Not out of the box, but try google PHP RTF... - Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.