Posts

Showing posts from September, 2025

Multidimensional array in php:

   Multidimensional array in php: Multidimensional allows us to create more than one array within an array; it is a nested array, meaning the nesting of array definitions within one another. Multidimensional indexed array: Example 1: Create an array with square brackets and array(). <?php $a=[ ]; // array (); We can also use an array function here. $a[0][0]=1; $a[0][1]=12; $a[0][2]=13; $a[1][0]=14; $a[1][1]=15; $a[1][2]=16; $a[2][0]=17; $a[2][1]=18; $a[2][2]=19; echo $a[0][0],"\t"; echo $a[0][1],"\t"; echo $a[0][2],"\t\n"; echo $a[1][0],"\t"; echo $a[1][1],"\t"; echo $a[1][2],"\t\n"; echo $a[2][0],"\t"; echo $a[2][1],"\t"; echo $a[2][2],"\t"; ?> OUTPUT 1         12        13 14        15        16 17        18        19 Example 2: <?php $a=[[1,2,3],[4,5,6],[7,8,9]]; // array(array(1,2,3...

Towards the dream

 Towards the dream When you start walking toward your dream, you'll notice something strange. The path isn't just difficult but noisy. Everybody's talking, your relatives have opinions, your friends have suggestions, and your social media feed screams a thousand things you should be doing. Everybody's living their best life online except you, sitting with a half-baked idea, a tired soul, and a mind that can't sit still for 5 minutes.  जेव्हा तुम्ही तुमच्या स्वप्नाकडे वाटचाल करायला सुरुवात करता तेव्हा तुम्हाला काहीतरी अनोख्या गोष्टी दिसतील. हा मार्ग फक्त कठीण नाहीये ,  तर तेथे गोंगाट आहे. सगळे बोलत आहेत ,  तुमच्या नातेवाईकांची मते आहेत ,  तुमच्या मित्रांकडे सूचना आहेत ,  तुमचा सोशल मीडिया मध्ये तुम्हाला करायला हव्या अशा हजारो गोष्टी आहेत. तुमच्याशिवाय सगळेच ऑनलाइन जगात त्यांचे सर्वोत्तम जीवन जगत आहेत ,  अर्धवट भाजलेल्या कल्पनेसह तुम्ही. एक थकलेला आत्मा आणि एक मन जे ५ मिनिटेही शांत बसू शकत नाही. Welcome to the real world. The enemy of success is not fail...

Conditional statements in PHP

     Conditional statements : if, if-else, switch, The ? Operator In PHP, conditional statements execute code based on the truth or false of conditions. PHP allows the following conditional statements, If statements. If……. Else statements. Switch statements. The ? operator. If statements: If conditions allow us to execute our program with a single true condition. Syntax: If(condition) { //to be executed block of code if the condition is true. } Flowchart:   Example 1:    Simple program with PHP. <?php $a=5; if($a%2==0) {              echo "Number is Even"; } ?> OUT-PUT Number is Even   Example 2: Program with PHP and HTML. <html> <body> <form method="POST" action="p1.php">    Name: <input type="text" name="fname">    <input type="submit"> </form> <?php $a=$_POST['fname']; if($a%2==0) {        ...