Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

[PHP3] [Fwd: 2 small questions...] From: Mario Jorge Nunes Filipe (mjnf <email protected>)
Date: 02/26/99

Hello everyone

I have a couple of questions to pose to the fine people who lurk (or is
it lurke) arround this list.
 
Number 1 - I want to produce a CSV file of a set of records from a
database so that the users can import it into Excel (or similar). I'm
forcing the browser to present the save dialog using a bogus
Contents-Type, but it allways presents the same default name (the name
of the php file). IS there a way to change this ?

Number 2 - the very same files are going to be treated by the users and
then re-imported to the system. Each line has a student number, the
grade, and an adittional note. I read a line with fgets, then explode it
using "," as the separator. There is a possibilitie that the first
contains the headers instead of info, but it might not be there either.
So i thought about testing the first field by doing is_int($dados[0]).
$dados[0] is an integer (I insert into postgres on an int field and it
doesn't complain) but is_int returns nothing and neither does is_string
! So the question is : am i using is_int wrongly or is this pure and
simply broken (unlikely?)?
 

--
         Mario Filipe
         mjnf <email protected>
         http://neptuno.sc.uevora.pt/~mjnf

-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>