Brand Logo

Website Coding Portal
HTML CSS & Script

Sawami Vivekanand
code
PHP Substr Function

✯ PHP की मदद से हम वेरिएबल में स्टोर वैल्यू को प्रिंट कर सकते हैं तथा जब हम किसी वेरिएबल वैल्यू को प्रिंट करते हैं तब वेरिएबल में स्टोर की गयी सम्पूर्ण वैल्यू वेब पृष्ठ पर प्रिंट हो जाता है । PHP में Substr() फंक्शन का इस्तेमाल तब किया जाता हैं जब PHP वेरिएबल में स्टोर की हुई वैल्यू में से प्रारम्भ या अंतिम की कुछ वैल्यू को ही प्रिंट करवाना हो ।

✯ With the help of PHP we can print the value stored in the variable and when we print any variable value then the entire value stored in the variable gets printed on the web page. Substr() function in PHP is used when only some value of the beginning or end of the value stored in the PHP variable has to be printed.

✧ PHP Substr Function Structure ✧

✧ परिणाम ✧

PHP Education


9928450000


Ram


am India


9928xxxx00

✧ फंक्शन की सरंचना ✧

✯ इस फंक्शन की सरंचना में 3 भाग substr(string, start, length) होते है जिसमें सबसे पहले किसी स्ट्रिंग या वेरिएबल को लिखा जाता हैं । इसके पश्चात वेरिएबल वैल्यू को वेबपेज में प्रिंट कहा से करना है उस स्थान के अक्षर की स्थान वैल्यू लिखी जाती हैं तथा अंत में वेरिएबल में स्टोर वैल्यू की अंतिम से कितने अक्षर छोड़र्ने है वो लिखा जाता हैं । इस फंक्शन में कम से कम फंक्शन के दो हिस्सों को शामिल करना आवश्यक है जिसमें से स्ट्रिंग अत्यंत आवश्यक हिस्सा हैं ।

✯ The structure of this function consists of 3 parts substr(string, start, length) in which first a string or variable is written. After this, from where the variable value is to be printed in the webpage, the place value of the letter of that place is written and at last how many letters are to be left from the last of the stored value in the variable. This function must include at least two parts of the function, of which strings are an essential part.