Converting Strings to Hex Numbers in PHP
How To Convert Strings to Hex Numbers? If you want convert a string into hex format, you can use the bin2hex() function. Here is a PHP script on how to use bin2hex(): <?php $string = "Hello\tworld!\n"; print($string."\n"); print(bin2hex($string)."\n"); ?> This script will print: Hello world! 4... 2016-10-13, 208👍, 0💬
Replacing a Substring in PHP
How To Replace a Substring in a Given String? If you know the position of a substring in a given string, you can replace that substring by another string by using the substr_replace() function. Here is a PHP script on how to use substr_replace(): <?php $string = "Warning: System will shutdown in ... 2016-10-13, 208👍, 0💬
Finding a Substring in PHP
How to Find a Substring from a Given String? To find a substring in a given string, you can use the strpos() function. If you call strpos($haystack, $needle), it will try to find the position of the first occurrence of the $needle string in the $haystack string. If found, it will return a non-negati... 2016-10-13, 208👍, 0💬
Converting Leading Characters to Upper Case in PHP
How To Convert Leading Characters to Upper Case? If you are processing an article, you may want to capitalize the first character of a sentence by using the ucfirst() function. You may also want to capitalize the first character of every words for the article title by using the ucwords() function. H... 2016-10-13, 206👍, 0💬
HTML 'textarea' Element Attributes
What Are the Attributes of a "textarea" Element? There are several commonly used attributes for a "textarea" element: rows="n" - Required attribute. Used to specify the number of rows of the text input area. cols="n" - Required attribute. Used to specify the number of columns of the text input area.... 2017-04-04, 205👍, 0💬
Converting Character to ASCII Value in PHP
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you can use the ord() function, which takes the first charcter of the specified string, and returns its ASCII value in decimal format. ord() complements chr(). Here is a PHP script on how to use ord(): &... 2016-10-13, 205👍, 0💬
Reformatting a Paragraph of Text in PHP
How To Reformat a Paragraph of Text? You can wordwrap() reformat a paragraph of text by wrapping lines with a fixed length. Here is a PHP script on how to use wordwrap(): <?php $string = "TRADING ON MARGIN POSES ADDITIONAL RISKS AND IS NOT SUITABLE FOR ALL INVESTORS. A COMPLETE LIST OF THE RISKS ... 2016-10-13, 205👍, 0💬
'cellspacing' - White Spaces between HTML Table Cells
How To Control White Spaces between Table Cells? White spaces between cells refer to the vertical space between a upper cell and a lower cell in a table column, and the horizontal space between a left cell and a right cell in a table row. If inner borders are turned on, white spaces between cells ap... 2017-05-13, 203👍, 0💬
'frame' - Controlling HTML Table Borders
How To Turn On Some Parts of Table Outer Borders? If you don't want to turn all 4 edges of outer borders in a table, you need to use the "frame" attribute, which offer the following options: <table border="1" frame="border"> - Turns on all 4 edges. <table border="1" frame="box"> - Turns ... 2017-05-13, 202👍, 0💬
Generating Character from ASCII Value in PHP
How To Generate a Character from an ASCII Value? If you want to generate characters from ASCII values, you can use the chr() function. chr() takes the ASCII value in decimal format and returns the character represented by the ASCII value. chr() complements ord(). Here is a PHP script on how to use c... 2016-10-13, 201👍, 0💬
HTML 'table' Tag/Element
What Is a "table" Tag/Element? A "table" element is a block level element that you can use to present information in table of rows and columns. Here are basic rules about "table" elements: "table" elements are block elements. "table" elements can not have empty contents. "table" elements can not hav... 2017-05-20, 198👍, 0💬
HTML Tables and Table Cells
Where to find tutorials of introduction to HTML Tables and Table Cells? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team in introduction to HTML Tables and Table Cells. Clear answers are provided with tutorial exercises on table elements like: tabl... 2017-05-20, 194👍, 0💬
HTML Un-ordered List Item Markers
How To Use Different Markers on Unordered List Items? By default, browsers will use solid dots as the item markers for unordered lists. If you want to change them to something else, like tiny squares, you need to use CSS properties. Here is a tutorial example showing you how to set item markers to b... 2017-05-20, 191👍, 0💬
HTML Table Cell 'td' Tag/Element
What Is a "td" Tag/Element? A "td" element is a special element that can only be used as a sub-element of a "tr" element. A "td" element defines a column in a row. Here are basic rules about "td" elements: "td" elements are special elements only valid inside "tr" elements. "td" elements can have tex... 2017-05-20, 182👍, 0💬
HTML Table Row 'tr' Tag/Element
What Is a "tr" Tag/Element? A "tr" element is a special element that can only be used as a sub-element of a "table" element. A "tr" element defines a row in a table. Here are basic rules about "tr" elements: "tr" elements are special elements only valid inside "table" elements. "tr" elements can not... 2017-05-20, 179👍, 0💬
How To Specify Argument Default Values? in PHP? If you want to allow the caller to skip an argument ...
Where to find tutorials on how to work with MySQL Database in PHP? A collection of tutorials to answ...
How To Create a Directory in PHP? You can use the mkdir() function to create a directory. Here is a ...
How To Upload Files into Database in PHP? To store uploaded files to MySQL database, you can use the...
How To Remove Slashes on Submitted Input Values in PHP? By default, when input values are submitted ...