Skip to content

Tag: php

Yii deleteAll() records with condition

I’ve set up a log in process where a verification code is generated, and when successful, is then removed. However, i want to make sure that if there’s multiple verification codes for the same user, …

php://memory IO stream and fgetcsv()

I want to parse csv-like string so I can emulate csv and assert it into a test case. But it won’t parse into arrays. This is the output: Answer Remove the rn, not needed Your moving the pointer twice per loop, change to $parsed[] = $data

WordPress: how to hide toolbar in post editor?

I have a Custom Post Type (Products) in my WordPress web site. This is a WooCommerce Product, if it’s necessary to know. I need to hide toolbar (1) into wp-editor on Add Product page. Also I need to hide “Add media” button (2) and “Visual/Text” tabs (3). How do I hide them? Maybe…