Welcome Guest, Not a member yet? Register   Sign In
passing name instead of id
#20

Quote:what about this line is this right ?
Something is telling me that this line can't be correct, otherwise you wouldn't be asking, would you?

It appears to me that you don't understand the concept of php functions.
Imagine a function as a kitchen scale with a basket on it, and that you want to weigh potatoes. You put some potatoes into the basket; the scale will return (tell you) the weight in ounces.
If you pour milk into the basket, along with 6 bananas, you'll end up with a mess. The milk won't stay in the basket. And the scale won't return the weight of potatoes, because you didn't put any potatoes in it.
The values that you pass to a function should match the parameters the function expects to be passed (in number and in value type).
The return value of the function should match the (type of) value that's being expected by the line that calls the function.
Don't mess around with that.
Reply


Messages In This Thread
passing name instead of id - by manigopal - 10-23-2019, 08:39 PM
RE: passing name instead of id - by Wouter60 - 10-24-2019, 05:05 AM
RE: passing name instead of id - by manigopal - 10-24-2019, 05:31 AM
RE: passing name instead of id - by Wouter60 - 10-24-2019, 06:26 AM
RE: passing name instead of id - by manigopal - 10-25-2019, 10:26 AM
RE: passing name instead of id - by manigopal - 10-25-2019, 07:58 PM
Added Pagination - by manigopal - 10-25-2019, 11:59 PM
RE: passing name instead of id - by Wouter60 - 10-26-2019, 01:30 AM
RE: passing name instead of id - by manigopal - 10-26-2019, 01:44 AM
RE: passing name instead of id - by Wouter60 - 10-26-2019, 01:58 AM
RE: passing name instead of id - by manigopal - 10-26-2019, 02:01 AM
RE: passing name instead of id - by Wouter60 - 10-26-2019, 02:30 AM
RE: passing name instead of id - by manigopal - 10-26-2019, 07:18 AM
RE: passing name instead of id - by Wouter60 - 10-26-2019, 08:48 AM
RE: passing name instead of id - by manigopal - 10-26-2019, 09:02 AM
RE: passing name instead of id - by manigopal - 10-26-2019, 10:24 PM
RE: passing name instead of id - by manigopal - 10-27-2019, 01:07 AM
RE: passing name instead of id - by Wouter60 - 10-27-2019, 04:48 AM
RE: passing name instead of id - by manigopal - 10-27-2019, 07:16 AM
RE: passing name instead of id - by Wouter60 - 10-27-2019, 07:44 AM
RE: passing name instead of id - by manigopal - 10-27-2019, 08:04 AM
RE: passing name instead of id - by manigopal - 10-28-2019, 03:27 AM
RE: passing name instead of id - by Wouter60 - 10-28-2019, 10:50 AM
RE: passing name instead of id - by manigopal - 10-28-2019, 10:21 PM
RE: passing name instead of id - by wdeda - 12-28-2019, 05:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB