Associative Array Example in PHP
<?php $data = array( 'name'=>"John Doe", 'age'=>20, "company_name"=> "XYZ" ); echo $data['name']. "\n"; echo $data['age']. "\n"; echo $data['company_name']. "\n"; ?> Output: $ php associative_array.php John Doe 20 XYZ
Class and Object Example in PHP
<?php class Data { public $data; function setData($data){ $this->data = $data; } function getData(){ return $this->data; } } $data = new Data(); $data->setData( array( "name"=>"John Doe", "age"=>20, "company_name"=> "XYZ" )... Read More
WP_List_Table tutorial : How to display data from database to the admin block ?
WP_List_Table tutorial in WordPress In this tutorial, we will learn how to create an interface displaying the data from the database to the WordPress admin dashboard. What is the WP_List_Table?... Read More
Shortcode in WordPress
<?php // Use shortcode in a PHP file (outside the post editor). echo do_shortcode( '[sw_demo_search_form]' ); ?> https://developer.wordpress.org/reference/functions/do_shortcode/
Add Tracking Code in WordPress
Meta Pixel Code The Meta Pixel is a snippet of JavaScript code that allows you to track visitor activity on your website. It works by loading a small library of... Read More