PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Dec 22, 2014 12:00 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jan 06, 2011 10:02 am 
Offline
Forum Newbie

Joined: Thu Dec 30, 2010 4:49 am
Posts: 23
Hi,

I'm setting up an fpdf script where I use lots of variables. Some contain commas (,) and apostrophes (') when using these strings in the command cell() I get an unexpected t_string error.
I'm not sure but I think it's the apostrophe that triggers the error.

How can I bypass that?

Examples for such commands:

Syntax: [ Download ] [ Hide ]
//example:
$pdf->Cell(0,0,'69, Route d'Esch');


Last edited by DelPazzo on Thu Jan 06, 2011 1:47 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Jan 06, 2011 11:37 am 
Offline
Forum Regular
User avatar

Joined: Sun Dec 29, 2002 6:40 pm
Posts: 908
Location: VA
I've never had problems with commas before but you have to escape the apostrophes:

Syntax: [ Download ] [ Hide ]
$pdf->Cell(0,0,'69, Route d\'Esch');
 


Top
 Profile  
 
PostPosted: Thu Jan 06, 2011 1:46 pm 
Offline
Forum Newbie

Joined: Thu Dec 30, 2010 4:49 am
Posts: 23
thx that helped. ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group