Exploring Ruby on Rails as a Laravel Dev: Setup (Part 1)

As a Laravel dev, I expected a smooth Ruby on Rails setup—but hit a few bumps. After trying Homebrew, I switched to chruby for managing Ruby versions. In this post, I’ll share how I got Rails running on my Mac and why a centralized setup guide like Laracasts would be a game-changer.…

Filter out duplicate items in an associative array in PHP

Associative arrays in PHP offer a versatile way to store complex data structures. When it comes to filtering out duplicates based on a specific field within these arrays, the array_unique function might seem like a convenient solution. However, there's a catch. The PHP manual entry for array_…

Conditionally add items to an array in PHP

In PHP, arrays are a fundamental data structure that allows you to store multiple values in a single variable. However, sometimes you need to add elements to an array based on certain conditions. This can be achieved easily using the spread operator (...).…