0% found this document useful (0 votes)
20 views1 page

PHP String Functions Learning Activity

This document is a learning activity sheet for Grade 10 Computer Education focusing on PHP String Functions. It includes a learning target, common PHP string functions with their descriptions, example codes, and expected outputs. The activity aims to help students understand and explain the usage of PHP string functions.

Uploaded by

dgd8zsspm9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

PHP String Functions Learning Activity

This document is a learning activity sheet for Grade 10 Computer Education focusing on PHP String Functions. It includes a learning target, common PHP string functions with their descriptions, example codes, and expected outputs. The activity aims to help students understand and explain the usage of PHP string functions.

Uploaded by

dgd8zsspm9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

RC – AL KHWARIZMI INTERNATIONAL COLLEGE FOUNDATION INC.

SCIENCE LABORATORY SCHOOL


Barrio Marawi, National Highway, Marawi City
School ID: 478017
S.Y. 2024 – 2025

LEARNING ACTIVITY SHEET LAS No. 26

Name: ____________________________________________________
Grade Level and Section: Grade 10 – Score: __
Subject: COMPUTER EDUCATION 10 Date: __________________
Type of Activity:
Concept Notes Laboratory Report Formal Theme Others:
Skills: Exercise/Drill Drawing/Art Informal Theme ________________
Activity Title: PHP String Function
Learning Target: To explain the used of PHP
Reference: [Link]

Common PHP String function

PHP String name PHP Code Description Example code Output

Length of string PHP strlen() The PHP strlen() <?php 12


function returns echo strlen("Hello
the length of a world!");
string. ?>

Count the number PHP The PHP <?php 2


of string str_word_coun str_word_count() echo
t() function counts the str_word_count("Hell
number of words in o world!");
a string ?>

Reverse a string PHP strrev() The PHP strrev() <?php !dlrow olleH
function reverses a echo strrev("Hello
string world!");
?>

Search For a PHP strpos() The PHP strpos() <?php 6


Specific Text function searches echo strpos("Hello
Within a String for a specific text world!", "world");
within a string. ?>

If a match is found,
the function
returns the
character position
of the first match.
If no match is
found, it will return
FALSE.

Replace Text PHP The PHP <?php Hello Dolly!


Within a String str_replace() str_replace() echo
function replaces str_replace("world",
some characters "Dolly", "Hello
with some other world!");
characters in a ?>
string.

RC – AKICFI SLS OBILP Revised Learning Activity Sheet 2024

You might also like