You are here: Re: [PHP] fwrite and sort « PHP « IT news, forums, messages
Re: [PHP] fwrite and sort

Posted by Richard Lynch on 09/29/61 11:11

http://php.net/asort


On Mon, March 21, 2005 12:29 pm, Sebastian said:
> i have a form with checkboxes which after POST it writes to a file.
> i would like to allow the user to sort the selected checkbox filename in
> the
> order they want it written to file.
>
> so i was thinking creating an input text box where they can enter a
> number,
> then have it written to file in that order.. question is how?
> the script starts like such:
>
> foreach($_POST['map'] AS $file)
> {
> if(file_exists('/maps/'.trim($file)))
> {
> $found .= $file;
> }
> }
>
> if (file_exists($mapcycle) && $found)
> {
> $fp = fopen($mapcycle, 'w');
> fwrite($fp, $found);
> fclose($fp);
> }
>
> any help is appreciated.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация