Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> PHP

PHP में strtok() फंक्शन

विवरण

strtok() फंक्शन स्ट्रिंग को टोकनाइज़ करता है। यह स्ट्रिंग टोकन लौटाता है।

सिंटैक्स

strtok(str, split)

पैरामीटर्स

  • str − विभाजित करने के लिए स्ट्रिंग

  • split − एक या अधिक स्प्लिट कैरेक्टर्स निर्दिष्ट करता है

रिटर्न वैल्यू

strtok() फंक्शन स्ट्रिंग टोकन लौटाता है।

उदाहरण

निम्न एक उदाहरण है:

<?php
$str = "This is it!";
$token = strtok($str, " ");
while ($token !== false) {
    echo "$token<br>";
    $token = strtok(" ");
}
?>

आउटपुट

निम्न आउटपुट है:

This<br>is<br>it!<br>
  1. - PHP में quoted_printable_encode() फ़ंक्शन

    quoted_printable_encode() फ़ंक्शन PHP में quoted_printable_encode() फ़ंक्शन 8-बिट स्ट्रिंग को कोटेड-प्रिंटेबल स्ट्रिंग में बदलने के लिए उपयोग किया जाता है। सिंटैक्स quoted_printable_encode(string $string): string पैरामीटर्स string - कन्वर्ट की जाने वाली 8-बिट स्ट्रिंग रिटर्न वैल्यू quoted_print

  1. - PHP में quoted_printable_decode() फ़ंक्शन

    quoted_printable_decode() फ़ंक्शन PHP में quoted_printable_decode() फ़ंक्शन कोटेड-प्रिंटेबल स्ट्रिंग को 8-बिट स्ट्रिंग में बदलने के लिए उपयोग किया जाता है। सिंटैक्स quoted_printable_decode(string $string): string पैरामीटर्स string - इनपुट स्ट्रिंग रिटर्न वैल्यू quoted_printable_decode() फ़ंक्शन

  1. - PHP में nl_langinfo() फ़ंक्शन

    nl_langinfo() फ़ंक्शन PHP में nl_langinfo() फ़ंक्शन भाषा और लोकेल के बारे में विशिष्ट जानकारी प्राप्त करने के लिए उपयोग किया जाता है। नोट: यह फ़ंक्शन विंडोज पर काम नहीं करता। सिंटैक्स nl_langinfo(int $item): string|false पैरामीटर्स item - रिटर्न किए जाने वाले एलिमेंट को निर्दिष्ट करता है। निम्नलि