-1

i used in yii2 framework

in query select after asAarray() but in response json all integer to string !

$users = $model->asArray()->limit($limit)->offset($offset)->all();
1

1 Answer 1

-1

asArray() Whether to return the query results in terms of arrays instead of Active Records.

so it won't change your integer data, json_encode() or use yii\web\Response->format = 'json' to return json data may be used for you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.