<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP Archives - Codeplaners</title>
	<atom:link href="https://codeplaners.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://codeplaners.com/category/php/</link>
	<description>Code Solution</description>
	<lastBuildDate>Wed, 01 Jan 2025 06:40:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>

<image>
	<url>https://codeplaners.com/wp-content/uploads/2020/09/cropped-favicon-social-32x32.png</url>
	<title>PHP Archives - Codeplaners</title>
	<link>https://codeplaners.com/category/php/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Convert Datetime into Milliseconds in PHP</title>
		<link>https://codeplaners.com/convert-datetime-into-milliseconds-in-php/</link>
					<comments>https://codeplaners.com/convert-datetime-into-milliseconds-in-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 27 Dec 2024 03:53:49 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1687</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:37 amHi Dev, Today, we will show you convert datetime into milliseconds in PHP. This article will give you simple example of convert datetime into milliseconds in PHP. Let&#8217;s discuss convert datetime into milliseconds in PHP. In this article, we will implement a convert datetime &#8230; <a href="https://codeplaners.com/convert-datetime-into-milliseconds-in-php/" class="more-link">Continue reading<span class="screen-reader-text"> "Convert Datetime into Milliseconds in PHP"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/convert-datetime-into-milliseconds-in-php/">Convert Datetime into Milliseconds in PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:37 am</p><p>Hi Dev,</p>
<p>Today, we will show you convert datetime into milliseconds in PHP. This article will give you simple example of convert datetime into milliseconds in PHP. Let&#8217;s discuss convert datetime into milliseconds in PHP. In this article, we will implement a convert datetime into milliseconds in PHP.</p>
<p>So let’s follow few step to create example of convert datetime into milliseconds in PHP.</p>
<h3 class="step_code">Example 1: using DateTime()</h3>
<p><strong>index.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
  
/* Your date string */
$dateString = &quot;2023-01-01 12:34:56&quot;;
  
/* Create a DateTime object */
$dateTime = new DateTime($dateString);
  
/* Get the timestamp in seconds */
$timestampInSeconds = $dateTime-&gt;getTimestamp();
  
/* Convert seconds to milliseconds */
$timestampInMilliseconds = $timestampInSeconds * 1000;
  
/* Output the result */
echo &quot;Date in milliseconds: &quot; . $timestampInMilliseconds;
  
?&gt;
</pre>
<p><strong>Output:</strong></p>
<pre class="brush: php; title: ; notranslate">
Date in milliseconds: 1672576496000
</pre>
<h3 class="step_code">Example 2: using strtotime()</h3>
<p><strong>index.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
  
/* Your date string */
$dateString = &quot;2023-01-01 12:34:56&quot;;
  
/* Convert date string to timestamp in seconds */
$timestampInSeconds = strtotime($dateString);
  
/* Convert seconds to milliseconds */
$timestampInMilliseconds = $timestampInSeconds * 1000;
  
/* Output the result */
echo &quot;Date in milliseconds: &quot; . $timestampInMilliseconds;
  
?&gt;
</pre>
<p><strong>Output:</strong></p>
<pre class="brush: php; title: ; notranslate">
Date in milliseconds: 1672576496000
</pre>
<p><strong>I hope it will assist you…</strong></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/convert-datetime-into-milliseconds-in-php/">Convert Datetime into Milliseconds in PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/convert-datetime-into-milliseconds-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Increase Session Timeout in PHP</title>
		<link>https://codeplaners.com/how-to-increase-session-timeout-in-php/</link>
					<comments>https://codeplaners.com/how-to-increase-session-timeout-in-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 26 Dec 2024 04:47:42 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<category><![CDATA[timeout in PHP]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1673</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:37 amHi Dev, Today, we will show you send how to increase session timeout in PHP. This article will give you simple example of how to increase session timeout in PHP. Let&#8217;s discuss how to increase session timeout in PHP. In this article, we will &#8230; <a href="https://codeplaners.com/how-to-increase-session-timeout-in-php/" class="more-link">Continue reading<span class="screen-reader-text"> "How to Increase Session Timeout in PHP"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-increase-session-timeout-in-php/">How to Increase Session Timeout in PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:37 am</p><p>Hi Dev,</p>
<p>Today, we will show you send how to increase session timeout in PHP. This article will give you simple example of how to increase session timeout in PHP. Let&#8217;s discuss how to increase session timeout in PHP. In this article, we will implement a how to increase session timeout in PHP.</p>
<p>So let’s follow few step to create example of how to increase session timeout in PHP.</p>
<h3 class="step_code">What is PHP Session Timeout</h3>
<p>PHP session timeout is the period of time when a user accesses our website before a server-side session is initiated to store relevant data such as login details, shopping cart contents, or other information. The concept of session timeout refers to the limit during which a session remains active before the server automatically terminates it. This mechanism is typically implemented to protect sensitive user data by terminating the session if a user remains inactive for a specific period of time, thereby preventing unauthorized access.</p>
<p>In PHP, session timeout is controlled by the session.gc_maxlifetime directive in the php.ini file. This directive sets the maximum lifetime of a session in seconds. By default, this value is set to 1440 seconds (24 minutes).</p>
<p>If you want to extend the session time, you can do the following:</p>
<h3 class="step_code">Example 1: Modify php.ini</h3>
<p>1. Open the php.ini file.</p>
<p>2. Look for the session.gc_maxlifetime directive in the file.</p>
<p>3. Change the value to the desired session timeout period in seconds. For example, to set the timeout to 1 hour, you can set it to 3600 seconds.</p>
<pre class="brush: php; title: ; notranslate">
session.gc_maxlifetime = 3600
</pre>
<p>4. Save the changes.</p>
<p>Ezoic<br />
5. Restart your web server to apply the changes.</p>
<h3 class="step_code">Example 2: Set it in your PHP script</h3>
<p><strong>index.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    
/* Set session timeout to 1 hour (3600 seconds) */
ini_set('session.gc_maxlifetime', 3600);
    
/* Optionally, set session cookie lifetime */
ini_set('session.cookie_lifetime', 3600);
    
/* Start the session */
session_start();
</pre>
<p><strong>I hope it will assist you…</strong></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-increase-session-timeout-in-php/">How to Increase Session Timeout in PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-increase-session-timeout-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Select Option Subcategory By Category In PHP</title>
		<link>https://codeplaners.com/select-option-subcategory-by-category-in-php/</link>
					<comments>https://codeplaners.com/select-option-subcategory-by-category-in-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 08 Dec 2024 05:09:28 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Laravel 8]]></category>
		<category><![CDATA[Laravel 9]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[category by Subcategory]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1438</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:38 amHi Dev, Today, i we will show you select option subcategory by category in php. This article will give you simple example of select option subcategory by category in php. you will select option subcategory by category in php. In this article, we will &#8230; <a href="https://codeplaners.com/select-option-subcategory-by-category-in-php/" class="more-link">Continue reading<span class="screen-reader-text"> "Select Option Subcategory By Category In PHP"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/select-option-subcategory-by-category-in-php/">Select Option Subcategory By Category In PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:38 am</p><p>Hi Dev,</p>
<p>Today, i we will show you select option subcategory by category in php. This article will give you simple example of select option subcategory by category in php. you will select option subcategory by category in php. In this article, we will implement a select option subcategory by category in php. </p>
<p>So let’s follow few step to create example of select option subcategory by category in php.</p>
<h3 class="step_code">database.php</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
	$servername = &quot;localhost&quot;;
	$username = &quot;root&quot;;
	$password = &quot;&quot;;
	$db=&quot;example&quot;;
	$conn = mysqli_connect($servername, $username, $password,$db);
?&gt;
</pre>
<h3 class="step_code">index.php</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
include 'database.php';
$result = mysqli_query($conn,&quot;SELECT * FROM category&quot;);
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
  &lt;title&gt;Select Option Subcategory By Category In PHP - Codeplaners&lt;/title&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css&quot;&gt;
  &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;container&quot;&gt;
	&lt;form&gt;
		&lt;div class=&quot;form-group&quot;&gt;
		  &lt;label &gt;Category&lt;/label&gt;
		  &lt;select class=&quot;form-control&quot; id=&quot;category&quot;&gt;
		  &lt;option value=&quot;&quot;&gt;Select Category&lt;/option&gt;
		    &lt;?php
			while($row = mysqli_fetch_array($result)) {
			?&gt;
				&lt;option value=&quot;&lt;?php echo $row&#x5B;&quot;id&quot;];?&gt;&quot;&gt;&lt;?php echo $row&#x5B;&quot;category_name&quot;];?&gt;&lt;/option&gt;
			&lt;?php
			}
			?&gt;
			
		  &lt;/select&gt;
		&lt;/div&gt;
		&lt;div class=&quot;form-group&quot;&gt;
		  &lt;label for=&quot;sel1&quot;&gt;Sub Category&lt;/label&gt;
		  &lt;select class=&quot;form-control&quot; id=&quot;sub_category&quot;&gt;
			
		  &lt;/select&gt;
		&lt;/div&gt;
	&lt;/form&gt;
&lt;/div&gt;
&lt;script&gt;
$(document).ready(function() {
	$('#category').on('change', function() {
			var category_id = this.value;
			$.ajax({
				url: &quot;get_subcat.php&quot;,
				type: &quot;POST&quot;,
				data: {
					category_id: category_id
				},
				cache: false,
				success: function(dataResult){
					$(&quot;#sub_category&quot;).html(dataResult);
				}
			});
		
		
	});
});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h3 class="step_code">get_subcat.php</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
	include 'database.php';
	$category_id=$_POST&#x5B;&quot;category_id&quot;];
	$result = mysqli_query($conn,&quot;SELECT * FROM category where category_id=$category_id&quot;);
?&gt;
&lt;option value=&quot;&quot;&gt;Select SubCategory&lt;/option&gt;
&lt;?php
while($row = mysqli_fetch_array($result)) {
?&gt;
	&lt;option value=&quot;&lt;?php echo $row&#x5B;&quot;id&quot;];?&gt;&quot;&gt;&lt;?php echo $row&#x5B;&quot;subcategory_name&quot;];?&gt;&lt;/option&gt;
&lt;?php
}
?&gt;
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/select-option-subcategory-by-category-in-php/">Select Option Subcategory By Category In PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/select-option-subcategory-by-category-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to display current week date in PHP</title>
		<link>https://codeplaners.com/how-to-display-current-week-date-in-php/</link>
					<comments>https://codeplaners.com/how-to-display-current-week-date-in-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 07 Dec 2024 09:56:42 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1393</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:39 amHi Dev, Today, i we will show you how to display current week date in php. This article will give you simple example of how to display current week date in php. you will how to display current week date in php. In this &#8230; <a href="https://codeplaners.com/how-to-display-current-week-date-in-php/" class="more-link">Continue reading<span class="screen-reader-text"> "How to display current week date in PHP"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-display-current-week-date-in-php/">How to display current week date in PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:39 am</p><p>Hi Dev,</p>
<p>Today, i we will show you how to display current week date in php. This article will give you simple example of how to display current week date in php. you will how to display current week date in php. In this article, we will implement a how to display current week date in php. </p>
<p>So let’s follow few step to create example of how to display current week date in php.</p>
<h3 class="step_code">Example</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    $date = date('Y-m-d');
    echo $date;
?&gt;
</pre>
<h3 class="step_code">output</h3>
<pre class="brush: xml; title: ; notranslate">
2022-01-20
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-display-current-week-date-in-php/">How to display current week date in PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-display-current-week-date-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Phone Numbers Format Change In PHP</title>
		<link>https://codeplaners.com/phone-numbers-format-change-in-php/</link>
					<comments>https://codeplaners.com/phone-numbers-format-change-in-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 07 Dec 2024 07:46:12 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1387</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:39 amHi Dev, Today, i we will show you phone numbers format change in PHP. This article will give you simple example of phone numbers format change in PHP. you will phone numbers format change in PHP. In this article, we will implement a phone &#8230; <a href="https://codeplaners.com/phone-numbers-format-change-in-php/" class="more-link">Continue reading<span class="screen-reader-text"> "Phone Numbers Format Change In PHP"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/phone-numbers-format-change-in-php/">Phone Numbers Format Change In PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:39 am</p><p>Hi Dev,</p>
<p>Today, i we will show you phone numbers format change in PHP. This article will give you simple example of phone numbers format change in PHP. you will phone numbers format change in PHP. In this article, we will implement a phone numbers format change in PHP. </p>
<p>So let’s follow few step to create example of phone numbers format change in PHP.</p>
<h3 class="step_code">Example 1</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php

    function phone_number_format($number){

        // Allow only Digits, remove all other characters.
        $number = preg_replace(&quot;/&#x5B;^\d]/&quot;,&quot;&quot;,$number);
     
        // get number length.
        $length_of_number = strlen($number);
     
        // if number = 10
        if($length_of_number == 10) {
            echo $number = &quot;Mobile Number is : &quot; . preg_replace(&quot;/^1?(\d{3})(\d{3})(\d{4})$/&quot;, &quot;$1-$2-$3&quot;, $number);
        }else{
            echo &quot;Invalid Number&quot;;
        }

    }

    phone_number_format(9423908056);

?&gt;
</pre>
<p>Output:</p>
<pre class="brush: php; title: ; notranslate">
Mobile Number is : 942-390-8056
</pre>
<h3 class="step_code">Example 2</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php 

    $data = '+11234567890';

    if(preg_match( '/^\+\d(\d{3})(\d{3})(\d{4})$/', $data,  $matches ) )
    {
        $result = $matches&#x5B;1] . '-' .$matches&#x5B;2] . '-' . $matches&#x5B;3];
        echo &quot;Mobile Number is : &quot;.$result;

    }else{
        echo &quot;Invalid Number&quot;;
    }

?&gt;
</pre>
<p>Output:</p>
<pre class="brush: php; title: ; notranslate">
Mobile Number is : 123-456-7890
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/phone-numbers-format-change-in-php/">Phone Numbers Format Change In PHP</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/phone-numbers-format-change-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Variables Pass In JavaScript Example</title>
		<link>https://codeplaners.com/php-variables-pass-in-javascript-example/</link>
					<comments>https://codeplaners.com/php-variables-pass-in-javascript-example/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 06 Dec 2024 11:57:49 +0000</pubDate>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1428</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:39 amHi Dev, Today, i we will show you PHP variables pass in javascript example. This article will give you simple example of PHP variables pass in javascript example. you will PHP variables pass in javascript example. In this article, we will implement a PHP &#8230; <a href="https://codeplaners.com/php-variables-pass-in-javascript-example/" class="more-link">Continue reading<span class="screen-reader-text"> "PHP Variables Pass In JavaScript Example"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/php-variables-pass-in-javascript-example/">PHP Variables Pass In JavaScript Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:39 am</p><p>Hi Dev,</p>
<p>Today, i we will show you PHP variables pass in javascript example. This article will give you simple example of PHP variables pass in javascript example. you will PHP variables pass in javascript example. In this article, we will implement a PHP variables pass in javascript example. </p>
<p>So let’s follow few step to create example of PHP variables pass in javascript example.</p>
<h3 class="step_code">Example 1</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    $message = &quot;Hello World!&quot;;
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;PHP Variables Pass In JavaScript Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;PHP Variables Pass In JavaScript Example&lt;/h1&gt;    
    &lt;script type=&quot;text/javascript&quot;&gt;
        var message = &quot;&lt;?php echo&quot;$message&quot;?&gt;&quot;;
        alert(message);
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h3 class="step_code">Example 2</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    $fruits = &#x5B;'orange' =&gt; 'mango', 'yellow' =&gt; 'banana', 'red' =&gt; 'apple'];
    $json_fruits = json_encode($fruits);
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;PHP Variables Pass In JavaScript Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;PHP Variables Pass In JavaScript Example&lt;/h1&gt;    
    &lt;script type=&quot;text/javascript&quot;&gt;
        var fruits = &lt;?php echo($json_fruits)?&gt;;
        alert(fruits.yellow);
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/php-variables-pass-in-javascript-example/">PHP Variables Pass In JavaScript Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/php-variables-pass-in-javascript-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Reverse Number In PHP Example</title>
		<link>https://codeplaners.com/reverse-number-in-php-example/</link>
					<comments>https://codeplaners.com/reverse-number-in-php-example/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 06 Dec 2024 03:33:11 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1579</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:39 amHi dev, Today, i show you reverse number in PHP example. This article will give you simple reverse number in PHP example. you will reverse number in PHP example. In this article, we will implement a reverse number in PHP example. It is a &#8230; <a href="https://codeplaners.com/reverse-number-in-php-example/" class="more-link">Continue reading<span class="screen-reader-text"> "Reverse Number In PHP Example"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/reverse-number-in-php-example/">Reverse Number In PHP Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:39 am</p><p>Hi dev,</p>
<p>Today, i show you reverse number in PHP example. This article will give you simple reverse number in PHP example. you will reverse number in PHP example. In this article, we will implement a reverse number in PHP example. </p>
<p>It is a straightforward illustration of how to utilise PHP&#8217;s strrev() function. The idea behind how to use PHP&#8217;s strrev() function is clear. If you&#8217;re wondering how to reverse numbers in PHP, I&#8217;ll provide a straightforward example and a solution.</p>
<p>So, let’s follow few steps to create example of reverse number in PHP example.</p>
<h3 class="step_code">Example 1: Reverse number in PHP without using any function PHP</h3>
<pre class="brush: php; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Reverse number in PHP without using any function PHP - codeplaners &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h4&gt;Reverse number in PHP without using any function PHP - codeplaners &lt;/h4&gt;
 
&lt;?php
    //define a variable and assign value
    $num = 23456; 
 
    //define variable and initialize with 0 
    $revNo = 0;  
 
    // iterate with loop
    while ($num &gt; 1)  
    { 
       // Multiply the reverse number by 10, and add the remainder which comes after dividing the number by 10.
 
        $rem = $num % 10;  
        $revNo = ($revNo * 10) + $rem;  
        $num = ($num / 10);   
    } 
    //Print the reversed number 
    echo &quot;Reverse number of 23456 is: $revNo&quot;;  
?&gt;   
 
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>Output:</strong></p>
<pre class="brush: php; title: ; notranslate">
Reverse number of 23456 is: 65432	
</pre>
<h3 class="step_code">Example 2: Reserve a number with using strrev() function in PHP</h3>
<pre class="brush: php; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Reverse number in PHP with using strrev() function PHP - codeplaners &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h4&gt;Reverse number in PHP with using strrev() function PHP - codeplaners &lt;/h4&gt;
 
&lt;?php 
    $number = 123456;  
    echo &quot;Reverse number of $number is &quot; .strrev( $number );  
?&gt; 
 
&lt;/body&gt;
&lt;/html&gt;   
</pre>
<p><strong>Output:</strong></p>
<pre class="brush: php; title: ; notranslate">
Reverse number of 123456 is 654321	
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/reverse-number-in-php-example/">Reverse Number In PHP Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/reverse-number-in-php-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Composer</title>
		<link>https://codeplaners.com/how-to-install-composer/</link>
					<comments>https://codeplaners.com/how-to-install-composer/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 03 Dec 2024 08:55:29 +0000</pubDate>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Vue Js]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[install composer]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=502</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:39 amEasy step Install Composer, follow my step by step Install Composer Step 1:- go to Download Composer page and click theComposer-Setup.exe link to download Composer Step 2:- After download, double-click the Composer-Setup.exe file and install the latest composer version. Click Next button. Step 3:- &#8230; <a href="https://codeplaners.com/how-to-install-composer/" class="more-link">Continue reading<span class="screen-reader-text"> "How to Install Composer"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-install-composer/">How to Install Composer</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:39 am</p><p>Easy step Install Composer, follow my step by step </p>
<h2>Install Composer</h2>
<h3>Step 1:- go to <a style="color:red;" href="https://getcomposer.org/download/" target="_blank" rel="Install Composer noopener noreferrer">Download Composer</a> page and click the<strong>Composer-Setup.exe</strong> link to download Composer</h3>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/03/1composer.png" alt="Install Composer" ></p>
<h3>Step 2:- After download, double-click the <strong>Composer-Setup.exe</strong> file and install the latest composer version. Click Next button.</h3>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/03/composer-1-step.png" alt="composer-1-step.png" ></p>
<h3>Step 3:- Select php.exe file, click Next button.</h3>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/03/composer-2-step.png" alt="composer-2-step.png" ></p>
<h3>Step 4:- No need add proxy URL, click Next button to continue.</h3>
<h3>Step 5:- Composer setup ready to install and click the Install button and continue.</h3>
<h3>Step 6:- complete installation, open the command prompt. Press “Win + R”, type in “cmd,” and click OK.</h3>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/03/open-command.png" alt="open-command" ></p>
<p>Then type <strong>“composer”</strong> and press enter</p>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/03/cmd.png" alt="cmd" ></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-install-composer/">How to Install Composer</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-install-composer/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Solve XAMPP  Issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?</title>
		<link>https://codeplaners.com/how-to-solve-xampp-issue-error-mysql-shutdown-unexpectedly/</link>
					<comments>https://codeplaners.com/how-to-solve-xampp-issue-error-mysql-shutdown-unexpectedly/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 20 Oct 2024 06:22:11 +0000</pubDate>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Laravel 10]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reacts]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[xampp]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1639</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:40 amHi dev, Today, i show you how to solve XAMPP issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?. In this article will tell you how to solve XAMPP issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?. you will how to solve XAMPP issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?. So, let’s follow &#8230; <a href="https://codeplaners.com/how-to-solve-xampp-issue-error-mysql-shutdown-unexpectedly/" class="more-link">Continue reading<span class="screen-reader-text"> "How To Solve XAMPP  Issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-solve-xampp-issue-error-mysql-shutdown-unexpectedly/">How To Solve XAMPP  Issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:40 am</p><p>Hi dev,</p>
<p>Today, i show you how to solve XAMPP  issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?. In this article will tell you how to solve XAMPP  issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?. you will how to solve XAMPP  issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?. </p>
<p>So, let’s follow few steps to create example of how to solve XAMPP  issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?.</p>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2023/10/xampp.jpg" alt="how to solve XAMPP  issue "Error: MySQL shutdown unexpectedly"?"></p>
<h3 class="step_code">Simple solution Open shell from Xampp Control Panel and run command</h3>
<pre class="brush: xml; title: ; notranslate">
mysqld --console --skip-grant-tables --skip-external-locking
</pre>
<h3 class="step_code">Again open an other shell and run</h3>
<pre class="brush: xml; title: ; notranslate">
mysqlcheck -r --databases mysql --use-frm
</pre>
<p><strong>Now close both the shells and restart xampp.</strong></p>
<p><strong>I hope it will assist you…</strong></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-solve-xampp-issue-error-mysql-shutdown-unexpectedly/">How To Solve XAMPP  Issue &#8220;Error: MySQL shutdown unexpectedly&#8221;?</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-solve-xampp-issue-error-mysql-shutdown-unexpectedly/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install and run multiple xampp on windows</title>
		<link>https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/</link>
					<comments>https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 01 Sep 2024 13:18:49 +0000</pubDate>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[xampp]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=397</guid>

					<description><![CDATA[<p>This post was last updated on January 1st, 2025 at 06:40 amIf some of your projects do not support PHP 7.1, you can install PHP 7.2. Without removing 7.1, Your Local Server xampp, see screenshot and install multiple xampp. 1. This link click and check your recruitment xampp php version and download. XAMPP PHP Version &#8230; <a href="https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/" class="more-link">Continue reading<span class="screen-reader-text"> "How to install and run multiple xampp on windows"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/">How to install and run multiple xampp on windows</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on January 1st, 2025 at 06:40 am</p><p>If some of your projects do not support PHP 7.1, you can install PHP 7.2. Without removing 7.1, Your Local Server xampp, see screenshot and install multiple xampp.</p>
<h2>1. This link click and check your recruitment xampp php version and download.</h2>
<p><a target="_blank" style="color: #FF5722;" href="https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/" rel="noopener noreferrer">XAMPP PHP Version </a></p>
<h2>2. Start the XAMPP installation process, download the XAMPP version your needs, double-click the .exe file.</h2>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/02/1.jpg" alt="XAMPP Installation process"></p>
<h2>3. Click next step</h2>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/02/2.jpg" alt="XAMPP Installation process"></p>
<h2>3. Change your folder name(C:\xampp2)  </h2>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/02/3.jpg" alt="XAMPP Installation process"></p>
<h2>4. Check your folder location two xampp folder insatll </h2>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/02/4.jpg" alt="XAMPP Installation process"></p>
<h2>5. Run new xammp see screenshort  </h2>
<p><img decoding="async" src="https://codeplaners.com/wp-content/uploads/2021/02/5.jpg" alt="XAMPP Installation process"></p>
<h2>6. Look at the image below and the path you will keep above is the same xampp will work. </h2>

<a href='https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/6-2/'><img width="300" height="157" src="https://codeplaners.com/wp-content/uploads/2021/02/6-1-300x157.jpg" class="attachment-medium size-medium" alt="" decoding="async" loading="lazy" srcset="https://codeplaners.com/wp-content/uploads/2021/02/6-1-300x157.jpg 300w, https://codeplaners.com/wp-content/uploads/2021/02/6-1-1024x535.jpg 1024w, https://codeplaners.com/wp-content/uploads/2021/02/6-1-768x401.jpg 768w, https://codeplaners.com/wp-content/uploads/2021/02/6-1-1200x626.jpg 1200w, https://codeplaners.com/wp-content/uploads/2021/02/6-1.jpg 1408w" sizes="(max-width: 300px) 85vw, 300px" /></a>

<h2>7. Watch the video </h2>
<p><iframe loading="lazy" width="100%" height="315" src="https://www.youtube.com/embed/ik-prJ3qV5M" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/">How to install and run multiple xampp on windows</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-install-and-run-multiple-xampp-on-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
