Archivi categoria: PHP

How to extract a single column values from CSV file in PHP

Importing data from a CSV file with PHP may mean you need to store or print just the results of a single and specific column of the table. To make an example, in the following case, I need to extract … Continua a leggere

Pubblicato in PHP | Lascia un commento

How to store WordPress Post Content in to a PHP variable

If you are developing something with WordPress you may need to create a variable in which to insert the content of a post. Something like: $content = ..post content.. Classic the_content() function just prints the content of the article but does not … Continua a leggere

Pubblicato in PHP, Wordpress | Lascia un commento

Str_replace that En Dash (or minus sign)! How to fix the problem when it’s not working

Building my first theme on WordPress I had been a very long time in to understand how to use str_replace function to change title of a page to remove all the words following another. This was approximately the string to change: … Continua a leggere

Pubblicato in HTML, PHP, Wordpress | Contrassegnato , , , , , | Lascia un commento