Counting values as array from col

QuestionsCounting values as array from col
C3media asked 8 years ago

Hello,

I'm trying to count values as array from Col but just take one (1), this is my code:

$num_cant = count($data["params"]["attachment"]);

Thanks by your help!

2 Answers
Abu Ghufran answered 8 years ago

If using multi-file upload feature,
You can use:

$arr = explode(",",$data["params"]["attachment"]
then use count($arr);

You can use

phpgrid_error($data); to see what actually is in $data variable.
This will be shown on edit dialog as error message (to debug)

C3media answered 8 years ago

Working first time…

Ok, thank you Abu!

Your Answer

9 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?