Language
-
Recent Posts
Recent Comments
Categories
Category Archives: PHP
Special characters in PHP exported CSV
When creating a CSV file with the special characters, be sure to encounter the problem of encoding characters. Although the output is in UTF-8 OK, Microsoft Excel displays the wrong characters. The solution is simple and is called BOM. At … Continue reading
Posted in PHP
Leave a comment
String contains another string
In this paper, I will bring a simple command (condition) in PHP to check whether a string contains another string. Unfortunately, PHP don’t have function contains, and we must create it yourself. 1st Testing whether a string contains a substring. … Continue reading
Posted in PHP
Leave a comment
Current page URL
Often it is necessary for PHP to find out what is the URL of the currently displayed page. If you are using only HTTP and not using a different port number than 80, you can use the following code: If … Continue reading
Posted in PHP
Leave a comment