Blog

Latest updates from Cleonix Technologies
How to check the checkbox in PHP

PHP is a scripting language that is open source, interpreted and object-oriented, i.e. performed on the server-side. It is used for the development of web applications (a server-side application that produces vibrant page).

The main features of PHP are:

1.Performance: PHP written script executes those scripts published in other languages like JSP & ASP much quicker.

2.Open Source Software: PHP source code is accessible free of charge on the internet, you can develop all versions of PHP as required without paying any costs.

3.Platform Independent: PHP is accessible for the operating system WINDOWS, MAC, LINUX & UNIX. It is also possible to readily execute a PHP application created in one OS in another OS.

4.Compatibility: PHP is compatible with nearly all current local servers such as Apache, IIS, etc. Embedded: PHP code within HTML tags and scripts can be readily embedded.

Today we will discuss about how to check the checkbox in PHP:


<?php
$fruit = array( 1 => "Mango", 2 => "Apple", 3 => "Banana", 4 => "Cherry", 5 => "Orange");
$the_key = "Orange|Apple|Cherry"; // or whatever you want
$myrow = explode("|",$the_key);
$containsSearch1 = array_intersect( $fruit,$myrow);

foreach($fruit as $key=> $val)
{
if(in_array($val,$containsSearch1))
{
echo $val."<input type='checkbox' name='check_list[]' value='".$val."' checked='checked' /><br />";
 }
else
{ echo $val."<input type='checkbox' name='check_list[]' value='".$val."'  /><br />"; }
}
?>

About the author


0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories
Latest Post
digital marketing

Basic overview of digital marketing everyone needs to know

Posted on 15 Jan 2021

Top trending java frameworks for 2021

Posted on 11 Jan 2021

web design

Find the best web designing company in Kolkata to build your own website

Posted on 15 Dec 2020

Tags
app development Appreciation from UNICEF basics of digital marketing Bengali New Year best web design company in saltlake best web designing company in kolkata Bhai dooj blogging blogging tips blogging tutorial Bootstrap cleonix technologies Cross-Browser Compatibility Css3 Dhanteras digital marketing digital marketing tutorial Diwali Durga Puja E-Commerce Eid Mubarak favicon Gandhi Jayanti Ganesh Chaturthi GIF Graphics design Happy Holi Happy Teacher's Day HTML5 Independece day information technology iOS iOS app development iOS benefits IT blogs Janmasthami java framework java frameworks 2021 java learning java tutorial JPEG learn blogging Logo Design Magento magento 2 magento with google shopping meta tags Mother's Day Nationbuilder off page seo off-page seo techniques online marketing osCommerce PHP PNG ppc Pray for Chennai professional web design Raksha Bandhan Responsive Website Design SEO SEO tips in 2020 software tools Subho Noboborsho SVG UI UX virtual assistant virtual assistant monitoring web design web design in kolkata Web Development Website Design Website Development Woo Commerce Wordpress