Today’s article, we will remove multiple elements by key in a PHP array. Using PHP we can delete multiple keys from an Array. In PHP there is no built in method to achieve this, but we can combine several PHP functions to achieve this. In this article we will be demonstrating two methods to remove […]
In this tutorial you will learn basic PHP File Handling — Create, Open, Read, Write, Append, Close, and Delete
Often times we have deal with br tags in the text area HTML element. Most of the time this occur when we print the database stored values in textarea.
PHP Fatal error: Call to undefined function mssql_connect() error popping out when connecting through MSSQL functions in Ubuntu server Answer In Ubuntu Just you need to install php5-sybase That’s it. Test with mssql_connect. You can verify this in PHP info file
This is a simple and complete login system in PHP and MySql. Most of the web applications it is necessary to have an authentication system. Latest frameworks such as Laravel, Symfony have bundles(modules) to do this job with the most advanced secure method. But this tutorial is intended for a beginners who wants to understand an […]
If we want to check a specific word contains in another string. It’s common this kind of requirement while developing projects in PHP. We can use strpos function which is used to find the occurrence of one string inside other: You notice that I used the check against the false as strpos returns the string […]
When you want to check a variable is an array or not in PHP. Please follow the following snippet.
PHP Fatal error: Call to undefined function add_action() in p-content/plugins/hello.php, I was getting the above error in the error logs. Assuming someone calling this URL directly. To avoid these I’ve added the WordPress good practice line on top of the script.
Export to CSV and saving to file, this is the topic I am explaining here. First of all, you will have a database which saved the data sets for you. I am using MySQL for saving the data. Opening the file in write mode and save the database records to CSV by using fwrite.
This will be help for other who are working in the web services. Add below code in your client page, can see the available functions in the service
TimThumb is a simple, flexible, PHP script that resizes images. You give it a bunch of parameters, and it spits out a thumbnail image that you can display on your site. TimThumb has seen a massive amount of use across the WordPress world, and a few months after we released it, I took over development […]