strpos in php: PHP strpos(), substr(),

Find the first position for the string inside the string :- strpos() echo strpos(“I love apple, I love apple too!”,”apple”);   Return word from the string substr() substr(“Hello world”,6); echo substr(“Hello world”,0,-1)   – Result : Hello worl echo substr(“Hello world”,-10,-2) – Result : ello wor echo substr(“Hello world”,0,-6) – Result : Hello  

Read More

PHP – PDF Generator

FPDF – PDF Generation FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. http://www.fpdf.org/ fPDF Tutorial – Sample Code :- require(‘fpdf/fpdf.php’); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont(‘Arial’,’B’,16); $pdf->Cell(40,10,’Hello World!’); $pdf->Output();

Read More