How to Capture All Variables in a PHP Function Scope
Listing the variables in a PHP function's scope can be helpful during debugging to determine which variables are accessible and defined. The scope of a variable is the areas of the script where the...
View ArticleHow to Install JSON With PHP
Web developers use the PHP scripting language to create dynamic websites. These sites depend on accessing streams of data to provide real-time and relevant data to site visitors. A Web developer...
View ArticleHow to Make a Persistent Connection to Oracle From PHP
Establishing a persistent connection to an Oracle database in PHP can improve your Web page performance. A persistent connection doesn't close when your script is finished running, so PHP can use the...
View ArticleHow to Convert CMYK to RGB With PHP
The CMYK color model is an additive model used in print. By adding percentages (0 to 100 percent) of cyan, magenta, yellow and black, printers can "trick" the human eye into perceiving different...
View ArticleHow to Fetch H1 Tags in PHP
PHP is a server-side scripting language that has many built-in features that can be used for parsing HTML, the language used to display Web pages on the World Wide Web. One of the most common tags used...
View ArticleHow to Set Up PHP to Send Mail
Adding PHP code on your Web page to send email can be a helpful way to enable users to send feedback or to allow administrators to message the website's members. Simple emails can be sent using PHP's...
View ArticleHow to Use Echo for an Anchor in PHP
Understanding how to use HTML tags, such as the "anchor" (<a>) tag, within PHP code is an important skill to learn when you want to combine the two languages to create a Web page. The anchor tag...
View ArticleHow to Ping Using PHP
Pinging a server with PHP is useful when you want to check if a server is online or to measure the time it takes the server to receive and send back a packet. The ping utility sends a ICMP echo request...
View ArticleHow to Remove PHP MailTo
When you include a MailTo code in a PHP form on your Web page, you create a code that will send you notice of a user registering or applying for something while utilizing the PHP form on your website....
View ArticleHow to Get a Sub XML Structure Snippet From a Big XML File
XML stands for "extensible markup language." XML provides a way for information and content to be transferred over the Internet. A "Data Object Model," or DOM, provides a standard way to access and...
View ArticleHow to Set Date & Time Zone Using Script
PHP stands for hypertext preprocessor. It is a programming language used on many Web pages, as it can be integrated directly into HTML. Web pages that use PHP often require the script to initialize a...
View ArticlePHP Layout Tutorial
PHP is a scripting language whose syntax makes it easy for anyone with experience in languages like Java or C++ to get into server side Web programming. However, PHP needs HTML code to lay out and...
View ArticleHow to Convert PHP Array Index to Numbers
PHP arrays assign a numerical index to each key value. Programmers who need to mark and display each value in a Web page need to print out the numerical value on a Web page. This technique allows users...
View ArticleHow to Cut Off Part of a String in PHP
Strings, a series of characters that are stored in PHP string variables, must often be parsed (extracted or cutoff). For example, if the first and last name of a person is stored in a string variable,...
View ArticleHow to Find a String Inside of a String of PHP
Using a computer programming language such as PHP to find specific words or sequences of characters in text is called finding a string within a string. Text in computer programming languages is stored...
View ArticleHow to Convert to Epoch Time in PHP & MySQL
Epoch time is an integral number of seconds that have passed since Jan. 1, 1970. In PHP, the "time" function returns a date in epoch time that allows you to perform calculations -- such as comparing...
View ArticleDifferences Between Two Strings in a PHP Function
To compare strings in a PHP function, you can generally use a simple evaluation such as "if($string1==$string2)." Sometimes, however, two strings in a PHP function can have subtle differences between...
View ArticleHow to Count Occurrences of a Character in a String in PHP
Counting the number of occurrences of a character in a string can be important when parsing strings in PHP, such as determining how many backslashes there are in a URL. A PHP string is a series of...
View ArticlePHP Fatal Error: Memory Exhausted
PHP applications, such as WordPress and Drupal, commonly encounter the PHP fatal error: memory exhausted. This usually occurs when a plugin or other extension causes the script to use too much server...
View ArticleHow to Use PHP Redirect Headers Anywhere in Scripts
When moving a website from one location to another, Web developers understandability wish to preserve their site's standing in the search engine rankings. Redirect headers are commonly used to redirect...
View Article