Trending December 2023 # How To Use Isblank With Examples # Suggested January 2024 # Top 18 Popular

You are reading the article How To Use Isblank With Examples updated in December 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 How To Use Isblank With Examples

ISBLANK Function

Checks if a specified cell is blank or not

Written by

CFI Team

Published July 2, 2023

Updated July 7, 2023

What is Excel ISBLANK Function?

The ISBLANK Function[1] is an Excel Information function that returns true if the argument cell has no information in it. ISBLANK checks a specified cell and tells us if it is blank or not. If it is blank, it will return TRUE; else, it will return FALSE. The function was introduced in MS Excel 2007.

In financial analysis, we deal with data all the time. The ISBLANK function is useful in checking if a cell is blank or not. For example, if A5 contains a formula that returns an empty string “” as a result, the function will return FALSE. Thus, it helps in removing both regular and non-breaking space characters.

However, if a cell contains good data, as well as non-breaking spaces, it is possible to remove the non-breaking spaces from the data.




Value (required argument) is the value that we wish to test. (This function takes in a cell)

How to use the Excel ISBLANK Function

As a worksheet function, ISBLANK can be entered as part of a formula in a cell of a worksheet. To understand the uses of this function, let us consider a few examples:

Highlight Missing Values – Example

Suppose we are given the following data:

Suppose we wish to highlight cells that are empty. We can use the ISBLANK coupled with conditional formatting. For example, suppose we want to highlight the blank cells in the range A2:F9, we select the range and use a conditional formatting rule with the following formula: =ISBLANK(A2:F9).

How to do conditional formatting?

The input formula is shown below:

We will get the results below.

Conditional formatting didn’t highlight cell E5. After checking, there is a formula inserted into the cell.

The Excel ISBLANK function will return TRUE when a cell is actually empty. If a cell is an empty string (“”), ISBLANK will return FALSE, as it is not technically blank,  and it won’t be highlighted as shown above.

Extracting the first NON-Blank value in an array

Suppose we wish to get the first non-blank value (text or number) in a one-row range. We can use an array formula based on the INDEX, MATCH, and ISBLANK functions.

We are given the data below:

Here, we want to get the first non-blank cell, but we don’t have a direct way to do that in Excel. We could use VLOOKUP with a wildcard *, but that will only work for text, not numbers.

Hence, we need to build the functionality by nesting formulas. One way to do it is to use an array function that “tests” cells and returns an array of TRUE/FALSE values that we can then match with MATCH. Now MATCH looks for FALSE inside the array and returns the position of the first match found, which, in this case, is 2. Now the INDEX function takes over and gets the value at position 2 in the array, which, in this case, is the value PEACHES.

As this is an array formula, we need to enter it with CTRL+SHIFT+ENTER.

We get the results below:

Additional Resources

Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial modeling and valuation analysis. To learn more, check out these additional CFI resources:

You're reading How To Use Isblank With Examples

How To Use Object In Excel Vba With Examples?

VBA Object

In Microsoft Excel, a VBA Object can contain one or more than one object. Such as a single workbook can have one or more than one worksheet. Workbook, Worksheet, Range, and cells are the objects in Excel. Each object has its own properties. And they all have a different method of application. Let say the workbook is the main object which has 2 worksheets in it. Those 2 worksheets will be its child object. One of the sheets has one range, so that sheet will become the main object, and the range will be its child object.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

How to Use Object in VBA

Let’s see the examples of object in Excel VBA.

You can download this VBA Object Excel Template here – VBA Object Excel Template

Example #1 – VBA Object

It can be written in many ways. Suppose we need to print any text in a cell, so this can be done in various ways. We can directly use the range value to that cell. This direct method is not a part of VBA Object but a process of performing a task that could be done by VBA Object as well. For this:

Step 1: Go to VBA and insert a Module from the Insert menu option as shown below.

Step 2: Now write the Sub Category of performed function, like VBA Object, in any other name as per your choice, as shown below.



End Sub

Step 3: Now select the range function considering any cell, let’s say cell B3 with Value as shown below.



VBAObject2() Range("B3").Value =

End Sub

Step 4: Now add text or word in that range cell as shown below.



VBAObject2() Range("B3").Value = "VBA Object"

End Sub

Step 5: Now, compile the code and run it by pressing the play button located below the menu bar.

Example #2 – VBA Object

This is the normal way of printing text to any cell. How we will see how the same process can be done when we use VBA Object. For this, we will need another fresh module. And in that,

Step 1: Go to VBA and insert a Module from the Insert menu option as shown below.

Step 2: Write the Sub Category of VBA Object as shown below.




End Sub

Step 3: Here, we will see the complete VBA Object from the main to a child category. First, select the currently opened workbook with the help of the command ThisWorkBook with Application, as shown below. This will select the workbook which is actually opened and last selected.



VBAObject1() Application.ThisWorkbook

End Sub

Step 4: Now select the sheet which is currently opened in the workbook, or we can write the name of the worksheet as well. Here, we have written the name of sheet Sheet1 in inverted commas, as shown below.



VBAObject1() Application.ThisWorkbook.Sheets ("Sheet1")

End Sub

Step 5: Now comes the range. Select the range of the cell where we need to print or insert the text. Here we are selecting cell B4, as shown below.



VBAObject1() Application.ThisWorkbook.Sheets("Sheet1").Range("B4").Value

End Sub



VBAObject1() Application.ThisWorkbook.Sheets("Sheet1").Range("B4").Value = "VBA Object"

End Sub

Step 7: Now, compile and run the code. We will see cell B4 has the text “VBA Object”.

This complete process is called VBA Object. In which we have first selected the main object, i.e. Workbook, which has its child object, i.e. Sheet1, and that has another child object range, i.e. cell B4.

Example #3 – VBA Object

There are many different ways to add text to any cell. One can be with Excel VBA Object, and others can be without it. In these categories, again, there are many ways to do it. Let’s see another way to add VBA Object. For this, we will need a module.

Step 1: In that module, add a subcategory; better make it with sequence number as shown below.




End Sub

Step 2: Select the worksheet by adding the name of the current worksheet, which is Sheet1, as shown below.



VBAObject3() Worksheets("Sheet1").

End Sub

Step 3: Now, add the range of the cell where we want to see the output, as shown below.



VBAObject3() Worksheets("Sheet1").Range("A3").Value

End Sub

Step 4: At last, give it a value that we can see once we run the code. We are considering the same text as seen in example 1.


VBAObject3() Worksheets("Sheet1").Range("A3").Value = "VBA Object"

End Sub

Step 5: Now run the code. We will see; cell A3 got the text which we wanted to add there, as shown below.

In this process, we have directly added the worksheet. So Worksheet will become our Object, and Range will become its child object.

Step 6: There is another way to perform the same task. In the bracket of the worksheet, instead of writing the sheet name, we can write the sequence of the sheet, which is 1, as shown below.





Worksheets("Sheet1").Range("A3").Value = "VBA Object"

Worksheets(1).Range("B3").Value = "VBA Object"

End Sub

Step 7: Now run the modified code. We will see cell B3 got the same text VBA Object as cell A3, as shown below.

By keeping both the code in line, we can see and compare the changes we made. In another way,

Step 8: Instead of the Worksheet function, if we use the Sheet with sequence and selecting cell C3 as range as shown below.




'Worksheets("Sheet1").Range("A3").Value = "VBA Object"

'Worksheets(1).Range("B3").Value = "VBA Object"

Sheet1.Range("C3").Value = "VBA Object"

End Sub

Step 9: Now run this code. We will see, again the same text will get added in range cell C3.

In all the methods which we have seen in this example, Worksheet is our object, and the range of the cell is child object or Sub-object.

Pros and Cons of  Excel VBA Object

We can make as many objects and link them together to sink them.

It makes use of Workbook, Sheet, and Range easy.

This allows a user to make changes in a specific Workbook, Worksheet or Range.

The same process can be performed by a much shorter code with having the same result.

Things to Remember

Worksheet and Sheet both have the same use.

We can select any worksheet of the same workbook of any number sequence.

While writing big lines of code, it is important to form an Object in which the Workbook, Worksheets, and Ranges of different cells are linked.

Must save the file in Macro-Enabled Excel format. It allows us to use the code and change the code whenever required.

Recommended Articles

This is a guide to VBA Object. Here we discuss how to use Object in Excel VBA along with practical examples and downloadable excel template. You can also go through our other suggested articles –

Guide To How Ansible Debug Work With Examples

Introduction to Ansible Debug

In Ansible, when we create and run playbooks, it’s very common that we run into an error due to some issues with our playbook. This can be a syntax error, a logical error or some mandatory parameter is missing. So, this is very important that we should always write our playbook in such have a way that it always prints enough information, be it successful or failure. In Ansible, a module named debug is the requirement when you need to debug and when you need more information in playbook execution output.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

In this article we will try to learn some concepts and see Ansible debug examples. This is a default module that comes with Ansible package. This module prints statements and variable’s values when executing playbooks. This can be very helpful in cases, where you can skip some erratic tasks in the playbook and don’t want to stop it altogether. Using debug in all the erratic tasks, will provide you enough information about the data execution in those tasks and all variables used in such tasks. This will help in troubleshooting and is very useful if you use it with registered variables. We will explore such cases in the example section.

How do Ansible Debug works?

In Ansible debug module comes with some parameters and these parameters accept some options. This is given below:

msg: – This parameter accepts strings as inputs. This is used to print a customized message. If no message is given, then a generic message like “Hello World!” is

var: – This accepts strings as input and this is the variable that has been set either by Ansible facts or by the playbook. Also, the values written here will be having implicit double interpolation, as this option runs in the jinja2 context. So, you don’t need to use jinja2 delimiter unless you want to print double interpolation as well. You can use double interpolation when you print a variable in a

verbosity: – This has default as 0. This parameter is used to control when debug is in a run. For example if value 3 is given then debug will only run if -v or above is given while running the playbook.

Examples to Implement Ansible Debug

Now we will take some examples, but before going there, we first understand our lab used for testing purposes. Here we have an Ansible control server named ansible-controller and two remotes hosts named host- one and host-two. We will create playbooks and run Ansible commands on the ansible-controller node and manage the users on remote hosts.

Examples #1

To print a default message on the output of running a playbook via ansible-playbook, we can create a simple playbook like below:


name: Here we use Ansible debug debug:


ansible-playbook debug_dafault_msg.yml

Example #2

To print the value of a variable that was defined in the same playbook. we can create a simple playbook like below:


var: fruit


ansible-playbook debug_print_var.yml

Example #3

To print an Ansible fact of remote hosts, we can create a simple playbook like



ansible-playbook debug_ansible_fact.yml

Example #4

To print a customized message on the screen, Write a playbook like below:


msg: “This is machine is {{ ansible_hostname }} with IP {{ ansible_default_ipv4.address }}”


ansible-playbook debug_with_customized_msg.yml

Example #5

You can register the output of a task in a variable and as we know the values of these variables will be stored in JSON format. So, you can call that variable later in the same playbook. To test this or to test which value will be used when we call registered variables. We can use debug like below, creating a playbook.



ansible-playbook debug_register_values.yml

Example #6

Controlling Verbosity is done by giving values against parameter verbosity and then mentioning the same or more number of –v while running the playbook. Like the playbook in previous. Where we didn’t define any verbosity, then by default it ran with 0 verbosity level. But if define the verbosity level like below:


var: free_mem.stdout_lines verbosity: 1


ansible-playbook debug_register_values.yml -v


Ansible debug module is a very helpful tool for playbook developers and for administrators who work on need to update a playbook frequently on per need basis. Also, while working in a team where others also have the same stakes as you, using the debug module to add more information is always beneficial and can avoid confusion and dependencies.

Recommended Articles

This is a guide to Ansible Debug. Here we discuss an introduction to Ansible Debug, how does it work with examples. You can also go through our other related articles to learn more –

How To Write A Bug Report With Examples

What is Bug Report? Why do you need a good bug report?

The purpose of this post-testing documentation is to provide information to the concerned team of professionals about the level of bugs encountered during the testing process.

Your software development engineer can be made aware of all the defects and issues present in the software using this type of report. It also lets you figure out what’s wrong with a bug, so you can use the best method to fix it. It also helps you to save your time and money by helping you catch bugs and issues.

Why should you care about good bug explanations?

Here is the point that you need to consider for writing a good, detailed software bug report:

It acts as a guide to help avoid the same bug in future releases.

Save time for communication (e-mails, calls).

Less work for developers (they will do exactly what you want).

You will have less bottlenecks in the project; bugs will be fixed faster and more efficient way.

How to Write Bug Report (Bug Report Template)

There is no exact bug report template, as it depends upon your bug-tracking system. Your template might be different.

However, the following common fields are always needed when you want to write a bug report:

Bug id/ Title.

Severity and Priority.



Steps to reproduce.

Expected result.

Actual result.

Attachments (screenshots, videos, text)

Let’s look at all these bug-tacking components one by one:

1) Title/Bug ID:

Every bug should be given a unique identification number. Bug reporting tools should be unique numbers for the newly raised bugs so we can easily identify the bug.


❌ Bad: “I can’t see the product when I again, tyrp it doesn’t.”



Too wordy

asks for a solution to be implemented.

✅ Good: “CART – New items added to the cart that does not appear”.

This kind of Title instantly locates the issue (CART)

It focuses on the actual technical problem.

2) Bug Severity:

Bug severity is a very important factor in the bug report. It describes the effect of the defect on the application’s performance.

Blocker: This error causes the app to fail.

Major: A critical error indicates a major change in the business logic.

Minor: An issue that doesn’t affect the application’s functionality but does affect the expected results.

Trivial: It does not affect the functionality or operation of the app. It could be a typographical error.

3) Bug Priority:

Following is the general gradation to decide bug priority:

High: It covers anything which affects the flow or blocks app usage.

Minor: All other errors like (typos, missing icons, layout issues, etc.).

4) Environment:

A Bug can appear in a specific environment and not others. For example, sometimes a bug appears when running the website on Firefox, or an app malfunction only when running on an Android device and working fine on iPhone.

These bug reports can only be identified with cross-browser or cross-device testing. So, when reporting the bug, QAs should be able to specify if the bug should be observed in one or more specific environments.

5) Summary:

However, adding only the Title in the bug report does not serve the purpose. So, if your Title isn’t enough, you can add a short report summary.

Your summary in as few words as possible including when and how the bug occurred. Your Title and bug description should also be used in searches, so you must ensure you have covered important keywords.


6) Steps to reproduce:

When reporting a bug, it is important to specify the steps to reproduce it. You should also include actions that may cause the bug. Here, don’t make any generic statements.

Be specific on the steps to follow:

Here, is an example of well-written procedure:


Select product X1.

7) Expected result:

In bug reports, describing the expected result per the technical task, test case outcomes design, or according to the tester’s opinion is important. All this helps developers to focus on quickly finding needed information.

For example:

8) Actual result:

As it names suggests, this s field describes the actual effect of the bug. It is very important to write a clear description of the actual result.

For example:

9) Attachments (screenshots and videos):

In bug reports, it is best practice to attach files to bug reports which makes it easier to perceive information when you need to display it visually:

For example:

Screenshot: Screenshots can easily elaborate mistakes in the program; s convenient when the bug is highlighted with a specific annotation, circle, or arrow image).

Video: Sometimes, it is difficult to describe the bug in words, so it’s better to create a video so that developer can rectify the defect in the program).

10) Affected Version:

It is the affected software version where the bug is reported.

11) Fix Version:

It is the software version in which the bug is resolved. So when the QA who reported the bug, checks whether it is fixed, he uses the correct software version.

12) Target version:

The target version where a bug should be targeted to be fixed. So, when the development team works on fixing a bug, they mostly target a particular application version.

13) Date Closed:

It is the date when the bug is closed by the software testing team. Closing a bug is a vital and integral part of software testing.

14) Status:

When a new bug is created, its status should be open. After that, it goes through stages like In Progress, Fixed, Running, Reopen, etc.

Tips for Bug Report Writing

Here are some important tips that you should remember while writing an effective bug report:

Be specific when creating bug reports. Make sure you don’t include any useless or irrelevant facts.

You must report the bug immediately as soon as it gets detected.

Prepare the report in detail to empower the developer to use the facts and the information to debug the issue.

You should test the same bug occurrence on other similar modules for validation.

Review the bug report at least once before submitting it.

You should ensure that the bug report contains the description of only one error.

Lastly, you should not be afraid to ask the Project Manager for help if you feel unclear about something.

Bug Reporting tools

The bug reporting process, performed manually, is now being performed with various bug reporting tools available in the market.


Zoho Bug Tracker


You can check our detailed review of the best bug reporting tool.

Common Problem and Solution while Writing a bug report:

Here are some common problems and their solutions while writing a bug report:

Bug Report Example Problem

When multiplying 2 by 3, the answer will be positive. Report the pattern, not an example.

The list will be ordered alphabetically when adding a new item to avoid this. Don’t only describe what’s wrong

To being, you will need to open your browser and type the site’s URL. You’ll find the first field, ‘username,’ misspelled. Always direct to the point (Never tell the story!).

The client’s name in the report is misspelled. Priority: High, Severity: High Never mix priority and severity.

The tax calculation formula is INCORRECT !!?? Does not use CAPS, red letters, red circles, ‘!’,

I don’t think that the home page Ul design is good. Don’t use your judgment.

Example of unclear description: About our discussion today, please do the required action for this page. Make your description understandable for everyone.

This is not good as it is unclear what is needed from the web development and design team

Minimize the options

The tax calculation formula is sometimes not working as expected. The golden rule: Don’t use the word ‘Sometimes’.

Example of Bug Report

Here is a small example of a bug report:

[MY ACCOUNT] Underline is displayed when mouseovering on the Update button.

Description: We need to remove the underline when mouseovering on the Update button in My Account section.

Browser/OS: Chrome 25. OSX Yosemite 10.10.2

Steps to reproduce:

2. Login via login credentials

3. Navigate to My Account

4. Mouseover on the Update button

Actual result: there is an underline.

Expected Result: no underline.

Must avoid mistakes in bug report writing

Here are some important mistakes that you should avoid while writing a bug report:

Don’t write about your dissatisfaction, and never include your personal feelings.

It annoys people who want to focus on the task when you overload your post with many emoticons.

Never overload your post with exclamation points; it does not speed up the work.

Nobody wants to feel offended. It destroys motivation and slows the realization of the issue.

How To Perform Migrate In Flask With Examples?

Definition on Flask Migrate

Flask migrate is defined as an extension that is used in the Flask application for handling database migrations for SQLAlchemy using Alembic. This module enables developers to quickly set up and starts the database schema migrations. The reason we require database migrations can be explained as follows. Suppose we build a database, and then require it to be modified by adding an extra column. Post addition we feel that the schema now present doesn’t fit well into the full application architecture and would like to return back to the original one. In a normal case it is difficult to do so, but with flask migrate the tasks are much smoother! In this article, we will look at ways on how we perform migration in Flask.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others


Installing flask migrate and configuring it:

pip install flask-migrate

Installing SQLAlchemy in Flask:

pip install flask-sqlalchemy

Configuring the Database URI in configuration parameter:

Initializing Migrate command:

Creation of migration repository:

flask db init

Creation of initial migration:

flask db migrate How to perform migrate in Flask?

Before we think about performing migrate in Flask, we need to make sure that the module is installed in the python environment. For that, we would need to run the command pip install flask-migrate which will ensure that the module is installed in the environment where the python code will be running from. One needs to also make sure that the SQL alchemy module is also installed for smooth running of the migrate in Flask. Once everything is set, we are ready for the next steps in performing migrate in Flask.

Flask applications sometimes feel the necessity to dynamically using or insert their own settings in the Alembic configuration. For taking care of the utility, we use the decorator utility which uses the configure callback. Post the decorator utility and callback a function is defined. This function can modify the configuration object or completely replace it with the new variable within the function. Using decorator allows usage of multiple configuration callbacks and the order in which the callbacks are invoked are undetermined. Once the configuration piece is sorted, it would be time for binding the databases. The installation of the SQL alchemy module provides features to allow Flask-migrate to track migrations to multiple databases. This is possible with the binds feature of SQL alchemy. Including –multidb argument into the command enables the creation of multiple database migration repositories.

The flow follows as:

from flask_script import Manager from flask_migrate import MigrateCommand appFlask = Flask(__name__) manager = Manager(appFlask) Examples

Let us discuss examples of Flask Migrate.

Example #1

Installation of the Flask migrate module in Python environment:


pip install flask-migrate


Example #2

Initializing the migrate instance:

from flask_migrate import Migrate from flask import Flask appFlask = Flask(__name__) from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy(appFlask) migrate = Migrate(appFlask, db) migrate


Example #3

Adding the MigrateCommand into the list of commands in the manager:


from flask_script import Manager from flask_migrate import MigrateCommand from flask import Flask appFlask = Flask(__name__) from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy(appFlask) manager = Manager(appFlask) manager.add_command('db', MigrateCommand) manager



In conclusion, in this article, we have learned about the migrate configuration and application in Flask. We can also use this methodology to include migration of an existing project as well so that developer doesn’t need to delete everything and then start from scratch. The only thing which needs to be kept in mind during the task of including migration in an existing project is some changes need to be made in the models of the source code. Like anytime else, rest is to you for experimentation.

Recommended Articles

This is a guide to Flask Migrate. Here we discuss the definition, syntax, How to perform migrate in Flask? and examples respectively. You may also have a look at the following articles to learn more –

How Php Ucwords() Works With Examples

Introduction to PHP ucwords()

Ucwords() in PHP is a built-in function. It is helpful to convert the first and foremost character of a string into uppercase. The ucwords() only supports PHP 4 & above versions. ucwords() function takes a string as an input value and it outputs the string by changing the first letter/character of the string into uppercase. Other than this every other character remains the same as the previous time. The ucwords() function in PHP returns converted to string by changing the first letter of all words to uppercase.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

Syntax Ucwords($string, $separator)

The ucwords() syntax accepts just two parameters.

1. $string( string mandatory ): Between the parenthesis of ucwords() function, string input is required. It is a must and mandatory to this function declaration in order to specify the string which is to be converted.

2. $separator ( Optional Parameter ): Separator is the optional parameter of ucwords() function. It contains words separator characters. The separator used in the input string for the words. The listed characters which are listed below are by default:

t for tab


r for Carriage return

n for newline

v for vertical tab

f for form feed

$Separator parameter added in 5.5.16, 5.4.32 versions of PHP.

How PHP ucwords() works?

PHP ucwords works when the text/words contain mixed types of letters/characters inside words. Only the first character of the word/ first characters of all the words which are in the sentence will be converted to capital letters. It works using a string value that contains word/words and it also uses one separator/delimiter value but it is optional. No issue with the separator variable.

Examples of PHP ucwords()

Given below are the examples

Example #1

How the basic program works by using ucwords() PHP function.


<?php $input_string = "hey buddy, pavan sake is coming just wait."; echo "Before:". $input_string; $result_string = ucwords($input_string); echo "After: ".$result_string;


Example #2


<?php $result_string1 = ucwords($input_string); echo $result_string2;


Example #3

This example here is to use ucwords() function on arrays which has a list of names/strings by removing delimeters/parameters “–“ and “”.


<?php function ucname($string1) { $string1 =ucwords(strtolower($string1)); foreach (array('-', ''') as $parameters1) { if (strpos($string1, $parameters1)!==false) { $string1 =implode($parameters1, array_map('ucfirst', explode($parameters1, $string1))); } } return $string1; } <?php $names1 =array( 'SAKE-PAVAN KUMAR', 'ANIL O'KUMAR', 'MARUTHI PRASAD', 'surendra la gandham', 'rAjAsEkHaR KAtUbaDi' ); /* Sake-Pavan Kumar Anil O'Kumar Maruthi Prasad Surendra La Gandham Rajasekhar Kattubadi */


Example #4

This is one of the sample programs of ucwords function.

This program has features like:

Multibyte/bytes Compatability

It handles delimiters even if there are multiple


<?php function ucwords_specific1 ($string1, $delimiters1 = '', $encoding1 = NULL) { if ($encoding1 === NULL) { $encoding1 = mb_internal_encoding();} if (is_string($delimiters1)) { $delimiters1 =  str_split( str_replace(' ', '', $delimiters1)); } $delimiters_pattern11 = array(); $delimiters_replace11 = array(); $delimiters_pattern21 = array(); $delimiters_replace21 = array(); foreach ($delimiters1 as $delimiter1) { $uniqid1 = uniqid(); $delimiters_pattern11[]   = '/'. preg_quote($delimiter1) .'/'; $delimiters_replace11[]   = $delimiter1.$uniqid1.' '; $delimiters_pattern21[]   = '/'. preg_quote($delimiter1.$uniqid1.' ') .'/'; $delimiters_replace21[]   = $delimiter1; } $return_string1 = $string1; $return_string1 = preg_replace($delimiters_pattern11, $delimiters_replace11, $return_string1); $words1 = explode(' ', $return_string1); { $words1[$index1] = mb_strtoupper(mb_substr($word1, 0, 1, $encoding1), $encoding1).mb_substr($word1, 1, mb_strlen($word1, $encoding1), $encoding1); } $return_string1 = implode(' ', $words1); $return_string1 = preg_replace($delimiters_pattern21, $delimiters_replace21, $return_string1); return $return_string1; } <?php mb_internal_encoding('UTF-8'); $string1 = "PAVAN KUMAR-SAKE d'alltechscience şŠ-òÀ-éÌ hello - web"; echo ucwords_specific1( mb_strtolower($string1, 'UTF-8'), "-'");


The main parameters which are involved in the above program are $string1, $delimeter1, $delimiters, encoding. Delimeter/Delimeters are the parameters that are an option but needed In the development. The string is the parameter that is to be converted. The encoding parameter is to know the character encoding. Internal characters encoding value/values will be used if the parameter don’t omits.

Example #5


<?php $title1 = 'PAVAN "THE KING" SAKE - (I WANT TO BE YOUR) SERVANT'; echo ucwords(strtolower($title1)); <?php function my_ucwords($string1) { $noletters1='"([/'; for($i=0; $i<strlen($noletters1); $i++) $string1 = str_replace($noletters1[$i], $noletters1[$i].' ', $string1); $string1=ucwords($string1); for($i=0; $i<strlen($noletters1); $i++) $string1 = str_replace($noletters1[$i].' ', $noletters1[$i], $string1); return $string1; } $title1 = 'PAVAN "THE KING" SAKE - (I WANT TO BE YOUR) SERVANT'; echo my_ucwords(strtolower($title1));


Example #6

This is the example of the code below which will convert all your words into small letters except the first letter. They will be a capital letter. Here ucfirst() function is used. It is also a part of ucwords() function.


<?php $text1 = "What Buddy ? No 'parameters',shit! "happening" chúng tôi solves many problems now???"; for ($i = 0; $i < count($data1[0]); $i++) { $data1[0][$i] = ucfirst($data1[0][$i]); } $text1 = implode("", $data1[0]); print $text1;


The above program’s output contains the same text which is under $text1 variable but just the first characters of the words which are listed in the variable will be changed to the capital letters remaining ones will remain as small letters.

Recommended Articles

This has been a guide to PHP ucwords(). Here we discuss syntax, parameters, and examples of PHP ucwords(). you may also have a look at the following articles to learn more –

Update the detailed information about How To Use Isblank With Examples on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!