Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

PHP String Functions: Length, Wordcount, Position, Replace, Case, Comparison, Trim, Assignments of Programming Languages

Examples of various php functions such as strlen, strwordcount, strpos, strreplace, ucwords, strtoupper, strtolower, strcmp, and trim. These functions are used for string manipulation in php.

Typology: Assignments

2019/2020

Uploaded on 10/10/2020

sayali-kapse
sayali-kapse 🇮🇳

1 document

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
<?php
echo strlen("Welcome");
echo"<br/>";
echo Str_word_count("Classmate");
echo"<br/>";
echo Strpos("Str","t");
echo"<br/>";
echo Str_replace("WELCOME","come","hello");
echo"<br/>";
echo Ucwords("india");
echo"<br/>";
echo Strtoupper("computer");
echo"<br/>";
echo Strtolower("COMPUTER");
echo"<br/>";
echo Strcmp("first","last");
echo"<br/>";
echo trim("savlon","lon");
echo"<br/>";
?>
output:
pf2

Partial preview of the text

Download PHP String Functions: Length, Wordcount, Position, Replace, Case, Comparison, Trim and more Assignments Programming Languages in PDF only on Docsity!

"; echo Str_word_count("Classmate"); echo"
"; echo Strpos("Str","t"); echo"
"; echo Str_replace("WELCOME","come","hello"); echo"
"; echo Ucwords("india"); echo"
"; echo Strtoupper("computer"); echo"
"; echo Strtolower("COMPUTER"); echo"
"; echo Strcmp("first","last"); echo"
"; echo trim("savlon","lon"); echo"
"; ?> output: