Zend Anwar

Full stack web developer

Function ereg_replace() is deprecated

Function ereg_replace() is deprecated : Example : print $input.”<hr>”.ereg_replace(‘/&/’, ‘:::’, $input); Replace print $input.”<hr>”.preg_replace(‘/&/’, ‘:::’, $input); Another  example : $anwar = ereg_replace(‘[^A-Za-z0-9_]’, ”, $ anwar ); Replace to $ anwar = preg_replace(‘/[^A-Za-z0-9_]/’, ”, $ anwar );

Read More

how to remove header line in TCPDF

How to remove header line in TCPDF Use the SetPrintHeader(false) and SetPrintFooter(false) methods before calling AddPage(). Like this: $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, ‘LETTER’, true, ‘UTF-8’, false); $pdf->SetPrintHeader(false); $pdf->SetPrintFooter(false); $pdf->AddPage();

Read More

How to minus in array php code

How to minus in array php code $A = array(5,10,10); $B = array(1,1,1); $a=array(); for($i=0; $i<=2; $i++){ $a[$i]= $A[$i]- $B[$i]; echo”<br>”.$a[$i]; } Output: 4 9 9

Read More

Incoming and Outgoing Mail Server Settings for Hotmail, Yahoo! Mail, GMail, MSN, AOL and more

Incoming and Outgoing Mail Server Settings for Hotmail, Yahoo! Mail, GMail, MSN, AOL and more  AOL: IMAP: imap.aol.com Port 143 SMTP: smtp.aol.com SSL: NO ATT World Net: POP3: ipostoffice.worldnet.att.net Port 995 SMTP: imailhost.worldnet.att.net Port 465 SSL REQUIRED for Incoming and Outgoing Cox: NOTE: With Cox you can only use their SMTP servers while on their […]

Read More

Regular Expression Basic Tutorial

Characters Character Description Example Any character except [\^$.|?*+() All characters except the listed special characters match a single instance of themselves. { and } are literal characters, unless they’re part of a valid regular expression token (e.g. the {n} quantifier). a matches a \ (backslash) followed by any of [\^$.|?*+(){} A backslash escapes special characters […]

Read More

Regular Expressions Examples

Regular Expressions Examples Regular Expressions for Username Pattern : /^[a-z0-9_-]{3,16}$/ Description: The beginning of the string (^), followed by any lowercase letter (a-z), number (0-9), an underscore, or a hyphen. Next, {3,16} makes sure that are at least 3 of those characters, but no more than 16. And last, the end of the string ($). […]

Read More

How to connect php and oracle database?

oci_connect : Connect to an Oracle database. oci_connect ( string $username , string $password [, string $connection_string [, string $character_set [, int $session_mode ]]] ) To create a connection to Oracle that can be used for the lifetime of the PHP script, perform the following steps. <?php // Create connection to Oracle $conn = oci_connect(“phphol”, […]

Read More

What is ucfirst, ucwords, lcfirst, strtolower, strtoupper function in php?

What is ucfirst, ucwords, lcfirst, strtolower, strtoupper function in php?  ucfirst : Make a string’s first character uppercase <?php $var = ‘anwar hossain!’; $var = ucfirst($var);             // Anwar hossain! $bar = ‘HELLO WORLD!’; $bar = ucfirst($bar);             // HELLO WORLD! $bar = ucfirst(strtolower($bar)); // Hello world! ?> ucwords : Uppercase the first character of each word […]

Read More

How know google about your site?

How know google about your site? To see if Google already knows about your site, do a “site:” search, like this: [ site:example.com ]. If pages from your site show up, your site (or a part of it) is already in Google’s index. If it doesn’t show up, and it’s very new, it’s possible that […]

Read More

How google works?

How google works? Algorithmic search Search is about giving people the answer they’re looking for—whether it’s a news article, sports score, stock quote, a video or a map. Google’s search engineers design algorithms that analyze millions of pages and return timely, high-quality, relevant answers to people’s questions. More information about Google Web Search. What about […]

Read More