PHP code example of kdaviesnz / seooptimize
1. Go to this page and download the library: Download kdaviesnz/seooptimize library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kdaviesnz / seooptimize example snippets
php
$content = "hello world";
$localized = \kdaviesnz\seooptimize\SEOOptimize::localize_title(
array(
'city'=>'Auckland',
'country'=>'New Zealand',
'region'=>'Oceania'
),
$content
);
$content = \kdaviesnz\seooptimize\SEOOptimize::optimize_content_for_search_engines($content);
$content = \kdaviesnz\seooptimize\SEOOptimize::remove_stopwords($content);
$keywords = array( 'some' );
$bold = \kdaviesnz\seooptimize\SEOOptimize::boldKeywordsCallback( $keywords );
$italicise = \kdaviesnz\seooptimize\SEOOptimize::italiciseKeywordsCallback( $keywords );
$content = \kdaviesnz\seooptimize\SEOOptimize::processContent( $content, array( $bold, $italicise ) );
var_dump($content);