Member Avatar for bben95

Hey everyone I'm new to php and I was wondering what does the * mean in php?
I tried to search for it on google but it searches for anything if I put in a *
Is that what it means in php? anything?

Recommended Answers

All 6 Replies

Hey everyone I'm new to php and I was wondering what does the * mean in php?
I tried to search for it on google but it searches for anything if I put in a *
Is that what it means in php? anything?

what do you mean? like what's it used for? for example:

$query="SELECT * FROM userlist"

It's a wildcard.

Member Avatar for bben95

yes thats what I meant. But does it mean to have one wildcard kind of. so like if I said

<?php
rename("/home/a6773990/public_html/webcam/raw"*".jpg","/home/a6773990/public_html/webcam/webcam/image.jpg");
?>

would that mean that I want to rename any jpg file in /webcam/raw to /webcam/webcam/image.jpg? Or would it mean that I want to rename any one lettered (because the wildcard is only one digit) image?

well im not 100% sure about the syntax cause ive never tried that before but i DO know that a wildcard has no limits unless YOU limit it. if left by itself it will seek EVERYTHING. you can, i believe, limit it by doing something such as th* which would find everything beginning with the letters th know what i mean? im pretty new too bein only 15 and learnin everything i have by a TON of googling and another ton of trial an error! hope that helps!

Member Avatar for bben95

oh thanks. im 15 too!

* is used in several puposes ... It can be used as arithmetic operator for multiplication like 5 * 5 . And its using as wildcard in mysql queries

Member Avatar for bben95

can it be used as a wildcard in file paths like the example I gave before? if not what could I use?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.