Page 335 - CITS - CSA - TP (Volume 1) - Hindi
P. 335

कंप्यूटर सॉफ्टवेयर एप्लीकेशन- CITS





                                ?>
                 </body>
                 </html>

              3   ो ाम को C:\Apache24\htdocs म  .php ए ट शन वाले फ़ो र म  सेव कर
              4  िवंडोज़ सिव स से Apache सिव स रन कर
              5   ाउज़र ओपन कर  और िन  एड ेस टाइप कर
                 http://localhost/foldername/

              6  रन करने के  िलए php फ़ाइल पर   क कर  और आउटपुट को वेरीफाई कर










           IV     ंग को सब   ंग म     ट करने के  िलए preg_split() का उपयोग करना (Using preg_split() for splits a string into substrings)
              1  टे  एिडटर ओपन कर

              2  िन  कोड िलख
                          <html >
                 <head>
                      <title> Using preg_split()</title>
                 </head>
                 <body>
                         <?php

                   // String to split
                   $string = “Hello, World! This is a test string.”;
                   // Split the string by spaces or punctuation marks
                   $words = preg_split(“/[\s,]+/”, $string);
                   // Display the resulting array

                   print_r($words);
                               ?>
                 </body>
                 </html>
              3   ो ाम को C:\Apache24\htdocs म  .php ए ट शन वाले फ़ो र म  सेव कर
              4  िवंडोज़ सिव स से Apache सिव स रन कर

              5   ाउज़र ओपन कर  और िन  एड ेस टाइप कर
                 http://localhost/foldername/
              6  रन करने के  िलए php फ़ाइल पर   क कर  और आउटपुट को वेरीफाई कर










                                                           319

                                     CITS : IT & ITES - कं  ूटर सॉ वेयर ए ीके शन - अ ास 58
   330   331   332   333   334   335   336   337   338   339   340